ZedThree / clang-tidy-review

Create a pull request review based on clang-tidy warnings
MIT License
90 stars 45 forks source link

Exclude not working? #19

Closed vadi2 closed 2 years ago

vadi2 commented 3 years ago

I've got my action setup like this:

- name: Check C++ changes against style guide
      uses: ZedThree/clang-tidy-review@v0.7.0
      id: static_analysis
      with:
        build_dir: 'b/ninja' # path is relative to checkout directory
        # PLACEMARKER: list of clang-tidy checks
        clang_tidy_checks: '-*,performance-*,readability-*,bugprone-*, ...'
        # the action doesn't see system-level libraries, need to replicate them here
        apt_packages: 'pkg-config,libzip-dev,libglu1-mesa-dev,libpulse-dev'
        exclude: '3rdparty'

but it does not seem like the exclude parameter is getting passed to the action...

image

What could be going wrong here?

ZedThree commented 2 years ago

The only think I can think is that there might be something wrong in the yaml, but then I would expect it to fail completely.

I can't figure out what could be going wrong. Here's an example where we use it:

      - name: Run clang-tidy
        uses: ZedThree/clang-tidy-review@v0.6.1
        id: review
        with:
          build_dir: build
          apt_packages: "libfftw3-dev,libnetcdf-c++4-dev, <snip>"
          clang_tidy_checks: '-*,performance-*,readability-*, <snip>
          # Googletest triggers a _lot_ of clang-tidy warnings, so ignore all
          # the unit tests until they're fixed or ignored upstream
          exclude: "tests/unit/*cxx"

and here's the resulting action:

Run ZedThree/clang-tidy-review@v0.6.1
  with:
    build_dir: build
    apt_packages: libfftw3-dev,libnetcdf-c++4-dev, <snip>
    clang_tidy_checks: -*,performance-*,readability-*, <snip>
    exclude: tests/unit/*cxx
    token: ***
    clang_tidy_version: 10
    include: *.[ch],*.[ch]xx,*.[ch]pp,*.[ch]++,*.cc,*.hh
    max_comments: 25
    pr: 2465
    repo: boutproject/BOUT-dev

From the looks of it, it's happening at the Github Actions level, so I'm not even sure how we could fix it.

You might try version 0.6.1, to see if it was working and I broke it somehow?

vadi2 commented 2 years ago

It might be because I haven't yet merged the workflow and Github was running the original version that's been committed.