Post

配一下clang-tidy

参考clang-tidy checkers

最后成品

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
UseColor: true

Checks: >
  android-cloexec-*,
  android-comparison-in-temp-failure-retry,
  bugprone-*,
  clang-analyzer-*,
  modernize-*,
  -modernize-use-trailing-return-type,
  readability-*,
  performance-*,
  cert-*,
  concurrency-*,
  cppcoreguidelines-init-variables,
  cppcoreguidelines-rvalue-reference-param-not-moved,
  cppcoreguidelines-special-member-functions,
  cppcoreguidelines-narrowing-conversions,
  google-build-explicit-make-pair,
  google-build-namespaces,
  google-build-using-namespace,
  google-default-arguments,
  google-explicit-constructor,
  google-global-names-in-headers,
  google-readability-avoid-underscore-in-googletest-name,
  google-readability-casting,
  google-readability-todo,
  google-runtime-int,
  google-runtime-operator,
  hicpp-avoid-goto,
  hicpp-exception-baseclass,
  hicpp-multiway-paths-covered,
  hicpp-no-assembler,
  hicpp-signed-bitwise,
  linuxkernel-must-use-errs,
  llvm-header-guard,
  llvm-include-order,
  llvm-namespace-comment,
  llvm-prefer-isa-or-dyn-cast-in-conditionals,
  llvm-prefer-register-over-unsigned,
  llvm-twine-local,
  misc-definitions-in-headers,
  misc-misplaced-const,
  misc-new-delete-overloads,
  misc-no-recursion,
  misc-non-copyable-objects,
  misc-redundant-expression,
  misc-static-assert,
  misc-throw-by-value-catch-by-reference,
  misc-unconventional-assign-operator,
  misc-uniqueptr-reset-release,
  misc-unused-alias-decls,
  misc-unused-parameters,
  misc-unused-using-decls,
  portability-restrict-system-includes,
  portability-simd-intrinsics,
  zircon-temporary-objects,
  clang-analyzer-core*,
  clang-analyzer-cplusplus.*
This post is licensed under CC BY 4.0 by the author.

Trending Tags