cpp-linter / cpp-linter-action

A Github Action for linting C/C++ code integrating clang-tidy and clang-format to collect feedback provided in the form of file-annotations, thread-comments, workflow step-summary, and Pull Request reviews.

Home Page:https://cpp-linter.github.io/cpp-linter-action/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

.clang-tidy is not considered

ivancho-ifa opened this issue · comments

I have a .clang-tidy configuration in my project https://github.com/ivancho-ifa/figures-counter however it doesn't seem to respect the specified checks.

ivancho-ifa/figures-counter@e18b642#annotation_12023133572

I've disabled the -modernize-use-trailing-return-type check but I still receive warnings for it. This works locally

The CI logs show:

Running "clang-tidy.exe --export-fixes=.cpp-linter_cache\clang_tidy_output.yml -checks=boost-*,bugprone-*,performance-*,readability-*,portability-*,modernize-*,clang-analyzer-*,cppcoreguidelines-* -p D:\a\figures-counter\figures-counter\out\build\x64-debug --extra-arg= figures-counter/impl/internal/sequential_figures_counter.cpp"

I find the --extra-arg= interesting since it shouldn't be there if there wasn't any extra args set.

There is no indication that the .clang-tidy file was found or not. That is typical for clang-tidy output though.

I did notice that you didn't turn off the default check overrides though:

-checks=boost-*,bugprone-*,performance-*,readability-*,portability-*,modernize-*,clang-analyzer-*,cppcoreguidelines-*

To rely solely on the .clang-tidy file, set the action's tidy-checks to an empty string:

      with:
        tidy-checks: ''

Thank you! This fixed my issue. I didn't notice the default overrides.