1- ---
2-
31#
42# Clang-tidy configuration for Zeth
53# This file follows the YAML syntax, see: https://yaml.org/spec/
2725# flexible. We consider this negligible compared to the benefits of
2826# manipulating variables that are explicitly typed.
2927#
30- Checks : >
28+ # -modernize-use-trailing-return-type,
29+ # -modernize-return-braced-init-list,
30+ # These are removed since they conflict with the current code style.
31+ #
32+ # -modernize-pass-by-value
33+ # -modernize-deprecated-headers
34+ # -modernize-use-default-member-init
35+ # -readability-redundant-member-init
36+ # -bugprone-exception-escape
37+ # These conflict with the current code style, or would require larger
38+ # changes. May wish to review in the future.
39+ #
40+ # -readability-magic-numbers
41+ # Disabled for now as it picks up some constants which don't necessarily need
42+ # their own variables (for some trivial multiplication and masking) and some
43+ # test data. May wish to review in the future.
44+ #
45+ # -readability-implicit-bool-conversion
46+ # We use implicit bool conversion for specifying many constants in terms of
47+ # `0` and `1`. (TODO: it may be a good idea to enable this to fix implicit
48+ # conversion in conditions).
49+ #
50+ # -readability-named-parameter,
51+ # We occasionally omit the name of a parameter in a function definition if the
52+ # parameter is unused, and avoid a compiler warning. This check complains
53+ # in these cases.
54+ #
55+ # -readability-identifier-naming
56+ # TODO: Retry this (attempts to customize this to our standards failed under
57+ # clang-tidy-10 - see CheckOptions below).
58+ #
59+ # -misc-non-private-member-variables-in-classes,
60+ # TODO: Public member variables are often used in our code, and in
61+ # dependencies. There is a good argument for not exposing these. Decide on a
62+ # policy and update this comment.
63+
64+ Checks :
3165 -*,
3266 bugprone-*,
3367 llvm-*,
@@ -38,30 +72,45 @@ Checks: >
3872 readability-*,
3973 -modernize-avoid-c-arrays,
4074 -modernize-use-bool-literals,
41- -modernize-use-auto
75+ -modernize-use-auto,
76+ -modernize-use-trailing-return-type,
77+ -readability-magic-numbers,
78+ -readability-implicit-bool-conversion,
79+ -modernize-return-braced-init-list,
80+ -readability-named-parameter,
81+ -modernize-pass-by-value,
82+ -modernize-use-default-member-init,
83+ -bugprone-exception-escape,
84+ -misc-non-private-member-variables-in-classes,
85+ -readability-redundant-member-init,
86+ -modernize-deprecated-headers,
87+ -readability-identifier-naming,
88+
89+ WarningsAsErrors :
90+ ' *'
4291
4392HeaderFilterRegex : ' libzeth/*.(h|hpp|cpp)'
4493
45- CheckOptions :
46- - key : readability-identifier-naming.MacroDefinitionCase
47- value : UPPER_CASE
48- - key : readability-identifier-naming.StaticConstantCase
49- value : UPPER_CASE
50- - key : readability-identifier-naming.ConstantParameterCase
51- value : lower_case
52- - key : readability-identifier-naming.FunctionCase
53- value : lower_case
54- - key : readability-identifier-naming.VariableCase
55- value : lower_case
56- - key : readability-identifier-naming.ClassCase
57- value : lower_case
58- - key : readability-identifier-naming.ClassMemberCase
59- value : lower_case
60- - key : readability-identifier-naming.NamespaceCase
61- value : lower_case
62- - key : readability-identifier-naming.TemplateParameterCase
63- value : CamelCase
64- - key : readability-identifier-naming.TemplateParameterSuffix
65- value : T
66- - key : readability-implicit-bool-conversion.AllowIntegerConditions
67- value : ' 1'
94+ # CheckOptions:
95+ # - key: readability-identifier-naming.MacroDefinitionCase
96+ # value: UPPER_CASE
97+ # - key: readability-identifier-naming.StaticConstantCase
98+ # value: UPPER_CASE
99+ # - key: readability-identifier-naming.ConstantParameterCase
100+ # value: lower_case
101+ # - key: readability-identifier-naming.FunctionCase
102+ # value: lower_case
103+ # - key: readability-identifier-naming.VariableCase
104+ # value: lower_case
105+ # - key: readability-identifier-naming.ClassCase
106+ # value: lower_case
107+ # - key: readability-identifier-naming.ClassMemberCase
108+ # value: lower_case
109+ # - key: readability-identifier-naming.NamespaceCase
110+ # value: lower_case
111+ # - key: readability-identifier-naming.TemplateParameterCase
112+ # value: CamelCase
113+ # - key: readability-identifier-naming.TemplateParameterSuffix
114+ # value: T
115+ # - key: readability-implicit-bool-conversion.AllowIntegerConditions
116+ # value: '1'
0 commit comments