Skip to content

Fails to parse diff when a file has many (or no) changes #274

@rturrado

Description

@rturrado

What events trigger your workflow?

on: push: branches: - develop - master pull_request:

What OS does your workflow use?

runs-on: ubuntu-latest

How is cpp-linter-action configured?

jobs: cpp-linters: name: "C++ linters" runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Run C++ linters uses: cpp-linter/cpp-linter-action@v2 id: linter env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: extensions: 'cpp,hpp' format-review: 'true' style: 'file' # use .clang-format config file tidy-checks: '-*' # disable clang-tidy checks version: 18 - name: Fail fast if: steps.linter.outputs.clang-format-checks-failed > 0 run: |  echo "::notice::Try executing 'python3 ./scripts/run_cpp_linters.py .' to fix linter issues."  exit 1  I initially had also the option `files-changed-only: 'false'`. I took it out but the error remains.

What was the unexpected behavior?

I'm getting this error from GitHub Actions:

ERROR:CPP Linter:response returned 406 from GET https://api.github.com/repos/QuTech-Delft/libqasm/pulls/263 with message: {"message":"Sorry, the diff exceeded the maximum number of files (300). Consider using 'List pull requests files' API or locally cloning the repository instead.","errors": 

You can see the full log here: https://github.com/QuTech-Delft/libqasm/actions/runs/11381786455/job/31663943797

I'm updating a master branch from a develop branch, and the PR includes over 500 files. But I don't see how that can affect the C++ linters.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions