Skip to content
Snippets Groups Projects

.clang-tidy

Merged René Paris requested to merge 20-clang-tidy-align-and-setup-first-set-of-rules into master
All threads resolved!

This MR consolidates the following discussions:

It also includes the changes by @mstump, necessary for proper execution of clang-tidy

This commit includes 2 commits:

  1. .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 \;
  2. in a second commit I removed some checks - more as a point of discussion. Please review individually.

Closes #20 (closed)

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • 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 (since modernize-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.

  • René Paris mentioned in commit ab224f4f

    mentioned in commit ab224f4f

  • René Paris added 7 commits

    added 7 commits

    • 9ba2e1ea...0f47e850 - 2 commits from branch master
    • be775924 - Add route definition to controller config
    • 1352263b - Add .clang-tidy
    • 7283bb66 - Update .clang-tidy and apply related changes
    • 26a6b8ce - For discussion: forced [[nodiscard]]
    • ab224f4f - Update .clang-tidy and apply related changes II

    Compare with previous version

  • René Paris resolved all threads

    resolved all threads

  • Author Developer

    Ad !78 (comment 1062052): Added your suggestions, except for google-readability-avoid-underscore-in-googletest-name and cppcoreguidelines-special-member-functions.

    I'd like to postpone that for now, so can go on with what we've got.

  • René Paris marked this merge request as ready

    marked this merge request as ready

  • Andreas Rauschert approved this merge request

    approved this merge request

  • merged

  • René Paris mentioned in commit 18b7a9be

    mentioned in commit 18b7a9be

  • Please register or sign in to reply
    Loading