2
2
[analysis.config.StaticAnalysisConfig]
3
3
; Check variable, class, struct, interface, union, and function names against
4
4
; the Phobos style guide
5
- style_check =" disabled "
5
+ style_check =" enabled "
6
6
; Check for array literals that cause unnecessary allocation
7
7
enum_array_literal_check =" enabled"
8
8
; Check for poor exception handling practices
9
- exception_check =" disabled " ; FIXME
9
+ exception_check =" enabled "
10
10
; Check for use of the deprecated 'delete' keyword
11
11
delete_check =" enabled"
12
12
; Check for use of the deprecated floating point operators
13
13
float_operator_check =" enabled"
14
14
; Check number literals for readability
15
- number_style_check =" skip-unittest " ;
15
+ number_style_check =" enabled "
16
16
; Checks that opEquals, opCmp, toHash, and toString are either const, immutable
17
17
; , or inout.
18
- object_const_check =" disabled "
18
+ object_const_check =" enabled "
19
19
; Checks for .. expressions where the left side is larger than the right.
20
20
backwards_range_check =" enabled"
21
21
; Checks for if statements whose 'then' block is the same as the 'else' block
22
22
if_else_same_check =" enabled"
23
23
; Checks for some problems with constructors
24
24
constructor_check =" enabled"
25
25
; Checks for unused variables and function parameters
26
- unused_variable_check =" disabled "
26
+ unused_variable_check =" enabled "
27
27
; Checks for unused labels
28
- unused_label_check =" disabled " ; FIXME
28
+ unused_label_check =" enabled "
29
29
; Checks for duplicate attributes
30
30
duplicate_attribute =" enabled"
31
31
; Checks that opEquals and toHash are both defined or neither are defined
32
- opequals_tohash_check =" disabled "
32
+ opequals_tohash_check =" enabled "
33
33
; Checks for subtraction from .length properties
34
- length_subtraction_check =" disabled"
35
- ; Checks for methods or properties whose names conflict with built-in properties
36
- builtin_property_names_check =" enabled" ; FIXME
34
+ length_subtraction_check =" enabled"
35
+ ; Checks for methods or properties whose names conflict with built-in propertie
36
+ ; s
37
+ builtin_property_names_check =" enabled"
37
38
; Checks for confusing code in inline asm statements
38
- asm_style_check =" disabled " ; FIXME
39
+ asm_style_check =" enabled "
39
40
; Checks for confusing logical operator precedence
40
- logical_precedence_check =" disabled "
41
+ logical_precedence_check =" enabled "
41
42
; Checks for undocumented public declarations
42
- undocumented_declaration_check =" disabled " ; FIXME
43
+ undocumented_declaration_check =" enabled "
43
44
; Checks for poor placement of function attributes
44
- function_attribute_check =" disabled "
45
+ function_attribute_check =" enabled "
45
46
; Checks for use of the comma operator
46
47
comma_expression_check =" enabled"
47
48
; Checks for local imports that are too broad
48
49
local_import_check =" skip-unittest"
49
50
; Checks for variables that could be declared immutable
50
- could_be_immutable_check =" disabled "
51
+ could_be_immutable_check =" enabled "
51
52
; Checks for redundant expressions in if statements
52
53
redundant_if_check =" enabled"
53
54
; Checks for redundant parenthesis
54
55
redundant_parens_check =" enabled"
55
56
; Checks for mismatched argument and parameter names
56
- mismatched_args_check =" disabled "
57
+ mismatched_args_check =" enabled "
57
58
; Checks for labels with the same name as variables
58
- label_var_same_name_check =" disabled "
59
+ label_var_same_name_check =" enabled "
59
60
; Checks for lines longer than 120 characters
60
61
long_line_check =" enabled"
61
62
; Checks for assignment to auto-ref function parameters
62
- auto_ref_assignment_check =" disabled " ; FIXME
63
+ auto_ref_assignment_check =" enabled "
63
64
; Checks for incorrect infinite range definitions
64
65
incorrect_infinite_range_check =" enabled"
65
66
; Checks for asserts that are always true
@@ -71,10 +72,48 @@ static_if_else_check="enabled"
71
72
; Check for unclear lambda syntax
72
73
lambda_return_check =" enabled"
73
74
; Check for auto function without return statement
74
- auto_function_check = " enabled"
75
- ; Check for explicitly annotated unittests
76
- explicitly_annotated_unittests = " enabled"
75
+ auto_function_check =" enabled"
77
76
; Check for sortedness of imports
78
- imports_sortedness = " disabled"
77
+ imports_sortedness =" enabled"
78
+ ; Check for explicitly annotated unittests
79
+ explicitly_annotated_unittests =" enabled"
80
+ ; Check for properly documented public functions (Returns, Params)
81
+ properly_documented_public_functions =" enabled"
79
82
; Check for useless usage of the final attribute
80
- final_attribute_check = " enabled"
83
+ final_attribute_check =" enabled"
84
+ ; Check for virtual calls in the class constructors
85
+ vcall_in_ctor =" enabled"
86
+ ; Check for useless user defined initializers
87
+ useless_initializer =" enabled"
88
+ ; Check allman brace style
89
+ allman_braces_check =" disabled"
90
+ ; Check for redundant attributes
91
+ redundant_attributes_check =" enabled"
92
+
93
+ ; Configure which modules are checked with a specific checker
94
+ ; Please help to extend these checks onto more Phobos modules
95
+ [analysis.config.ModuleFilters]
96
+ asm_style_check =" +std.algorithm"
97
+ auto_ref_assignment_check =" +std.algorithm.searching"
98
+ could_be_immutable_check =" +std.algorithm.internal"
99
+ exception_check =" +std.algorithm"
100
+ function_attribute_check =" +std.algorithm.searching"
101
+ imports_sortedness = " +std.algorithm.disabled" ; currently disabled, see https://github.com/dlang/phobos/pull/5478
102
+ label_var_same_name_check =" +std.algorithm.searching"
103
+ length_subtraction_check =" +std.algorithm.comparison"
104
+ logical_precedence_check =" +std.algorithm.internal"
105
+ long_line_check =" -std.regex.internal.thompson" ; Dscanner bug: https://github.com/dlang-community/D-Scanner/pull/465
106
+ mismatched_args_check =" +std.algorithm"
107
+ mismatched_args_check =" +std.algorithm"
108
+ number_style_check =" +std.algorithm.searching"
109
+ object_const_check =" +std.algorithm.internal"
110
+ opequals_tohash_check =" +std.algorithm.comparison"
111
+ redundant_attributes_check = " +std.algorithm"
112
+ style_check =" +std.algorithm.searching"
113
+ undocumented_declaration_check =" +std.algorithm.searching"
114
+ unused_label_check =" +std.algorithm"
115
+ unused_variable_check =" +std.algorithm.internal"
116
+ useless_initializer = " +std.algorithm.comparison"
117
+ vcall_in_ctor =" -std.socket,-std.xml"
118
+ properly_documented_public_functions =" +std.algorithm.internal"
119
+ explicitly_annotated_unittests =" -std.array,-std.allocator,-std.base64,-std.bitmanip,-std.concurrency,-std.conv,-std.csv,-std.datetime,-std.demangle,-std.digest.hmac,-std.digest.sha,-std.encoding,-std.exception,-std.file,-std.format,-std.getopt,-std.internal,-std.isemail,-std.json,-std.logger.core,-std.logger.nulllogger,-std.math,-std.mathspecial,-std.net.curl,-std.numeric,-std.parallelism,-std.path,-std.process,-std.random,-std.range,-std.regex,-std.socket,-std.stdio,-std.string,-std.traits,-std.typecons,-std.uni,-std.uri,-std.utf,-std.uuid,-std.xml,-std.zlib"
0 commit comments