.clang-tidy
This MR consolidates the following discussions:
- https://gitlab.eclipse.org/eclipse/simopenpass/scenario_api/-/issues/20 (issue for this MR)
- https://gitlab.eclipse.org/eclipse/simopenpass/scenario_api/-/merge_requests/7 (initial proposal)
- https://gitlab.eclipse.org/eclipse/simopenpass/scenario_api/-/merge_requests/74 (improved proposal + some discussion)
It also includes the changes by @mstump, necessary for proper execution of clang-tidy
- https://gitlab.eclipse.org/eclipse/simopenpass/scenario_api/-/merge_requests/76 (creating compile commands)
This commit includes 2 commits:
- .clang-tidy file, taken from https://gitlab.eclipse.org/eclipse/simopenpass/scenario_api/-/merge_requests/7 with minor adjustmens, as discussed in https://gitlab.eclipse.org/eclipse/simopenpass/scenario_api/-/issues/20 + some "on the fly" changes (e.g fix virtual/override → would create warnings with Doxygen ;) )
The changes have been directly applied using the following commands:
mkdir build && cd build cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON .. cd .. find include -name "*.h" -exec clang-tidy -p build/compile_commands.json {} --fix \;
- in a second commit I removed some checks - more as a point of discussion. Please review individually.
Closes #20 (closed)
Merge request reports
Activity
added Community Contribution label
requested review from @mstump, @adascri, and @arauschert
assigned to @rparisha2 and @mstump
mentioned in merge request !74 (closed)
mentioned in merge request !7 (closed)
- Resolved by René Paris
Thanks @rparisha2, this looks great!
I understand that this is just the first set of rules, but I believe we can already safely enable a few additional checks w/ minimal or no impact:
-
llvm-include-order
(not bc. of the LLVM headers, but bc. of points 1, 2, and 4) -
llvm-namespace-comment
(this is good practice, anyway, and we're only missing a few) -
google-readability-avoid-underscore-in-googletest-name
(for reasons described here, and there's only one test yet) -
cppcoreguidelines-explicit-virtual-functions
(sincemodernize-use-override
is fortunately enabled, anyway) -
cppcoreguidelines-special-member-functions
(w/AllowSoleDefaultDtor: true
-> no immediate impact)
On a side note, there are lots of formatting issues on this branch (and probably master as well) which need fixing before the merge.
Edited by Martin Stump-
@rparisha2 Can we please continue on this? If there is anything needed please give me a hint.
mentioned in commit ab224f4f
added 7 commits
Toggle commit listAd !78 (comment 1062052): Added your suggestions, except for
google-readability-avoid-underscore-in-googletest-name
andcppcoreguidelines-special-member-functions
.I'd like to postpone that for now, so can go on with what we've got.
mentioned in commit 18b7a9be
mentioned in commit xiaopan/scenario_api@a1b451a8