Skip to content

Add clang-tidy configuration file

Simone Gaiarin requested to merge gaiarin/okular:clang-tidy-config into master

Configure clang-tidy checks with a .clang-tidy config file.

In this way the configuration can be shipped with okular code and used by IDE such as KDevelop.

The configuration file has been generated with the following command:

clang-tidy -dump-config -header-filter='.*/okular/.*' -checks='-*,performance-*,bugprone-*,readability-inconsistent-declaration-parameter-name,readability-string-compare,modernize-redundant-void-arg,modernize-use-bool-literals,modernize-make-unique,modernize-make-shared,modernize-use-override,modernize-use-equals-delete,modernize-use-emplace,modernize-loop-convert,modernize-use-nullptr,-bugprone-macro-parentheses,-bugprone-narrowing-conversions,-bugprone-branch-clone,-bugprone-incorrect-roundings' -config="{WarningsAsErrors: '*'}" > .clang-tidy

To check that clang-tidy is picking up the config file on the CI build system, I think that one should run run-clang-tidy -dump-config and check that the output matches that of the .clang-tidy file.

Merge request reports

Loading