ZedThree / clang-tidy-review

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

Support .clang-tidy #9

Closed vadi2 closed 2 years ago

vadi2 commented 3 years ago

.clang-tidy file is a great tool to have one, consistent place for all the checks - would be great if the action supported it out of the box.

ZedThree commented 3 years ago

This shouldn't be too difficult -- it might even work already!

2bndy5 commented 3 years ago

according to the clang-tidy-10 --help:

--config=<string>              -
                                   Specifies a configuration in YAML/JSON format:
                                     -config="{Checks: '*',
                                               CheckOptions: [{key: x,
                                                               value: y}]}"
                                   When the value is empty, clang-tidy will
                                   attempt to find a file named .clang-tidy for
                                   each source file in its parent directories.

So, maybe it could be made explicit by setting clang_tidy_checks input to a empty or zero-length string. I don't see the docs saying that the .clang-tidy file is automatically sought which kinda makes sense because it would collide with the -checks= option.