update
This commit is contained in:
@ -13,14 +13,14 @@
|
||||
|
||||
[source,sh]
|
||||
----
|
||||
sudo apt-get install clang-tidy-6.0
|
||||
sudo apt-get install clang-tidy-10
|
||||
----
|
||||
|
||||
Использование:
|
||||
|
||||
[source,sh]
|
||||
----
|
||||
cmake "-DCMAKE_CXX_CLANG_TIDY=/usr/bin/clang-tidy-6.0" path/to/source
|
||||
cmake "-DCMAKE_CXX_CLANG_TIDY=/usr/bin/clang-tidy-10" path/to/source
|
||||
----
|
||||
|
||||
В каталоге проекта нужно создать файл `.clang-tidy` в формате YAML со
|
||||
@ -30,12 +30,25 @@ cmake "-DCMAKE_CXX_CLANG_TIDY=/usr/bin/clang-tidy-6.0" path/to/source
|
||||
----
|
||||
---
|
||||
Checks: '-*,
|
||||
clang-diagnostic-*,
|
||||
readability-*,
|
||||
modernize-*,
|
||||
cppcoreguidelines-*,
|
||||
google-*,
|
||||
bugprone-*'
|
||||
bugprone-*,
|
||||
clang-analyzer-*,
|
||||
cppcoreguidelines-*,
|
||||
google-*,
|
||||
llvm-*,
|
||||
misc-*,
|
||||
modernize-*,
|
||||
readability-*,
|
||||
performance-*,
|
||||
portability-*,
|
||||
-cppcoreguidelines-owning-memory,
|
||||
-cppcoreguidelines-avoid-magic-numbers,
|
||||
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
|
||||
-readability-magic-numbers,
|
||||
-readability-else-after-return,
|
||||
-modernize-use-trailing-return-type,
|
||||
-modernize-avoid-c-arrays,
|
||||
-performance-no-automatic-move,
|
||||
'
|
||||
CheckOptions:
|
||||
- key: readability-identifier-naming.ClassCase
|
||||
value: CamelCase
|
||||
@ -124,7 +137,7 @@ cmake -DCMAKE_LINK_WHAT_YOU_USE=TRUE ..
|
||||
|
||||
[source,sh]
|
||||
----
|
||||
sudo apt-get install clazy clang-6.0
|
||||
sudo apt-get install clazy clang-9
|
||||
----
|
||||
|
||||
Использование:
|
||||
@ -132,7 +145,6 @@ sudo apt-get install clazy clang-6.0
|
||||
[source,sh]
|
||||
----
|
||||
CLAZY_CHECKS=level2 cmake -DCMAKE_CXX_COMPILER=clazy ..
|
||||
CLANGXX=clang++-6.0 make
|
||||
CLANGXX=clang++-9 make
|
||||
----
|
||||
|
||||
=== PVS-Studio
|
||||
|
Reference in New Issue
Block a user