forked from saveourtool/diktat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdiktat-analysis.yml
247 lines (247 loc) · 5.92 KB
/
diktat-analysis.yml
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
- name: DIKTAT_COMMON
configuration:
domainName: your.package.name.here
testDirs: test
- name: CLASS_NAME_INCORRECT
enabled: true
configuration: {}
- name: CONSTANT_UPPERCASE
enabled: true
configuration: {}
- name: ENUM_VALUE
enabled: true
configuration: {}
- name: EXCEPTION_SUFFIX
enabled: true
configuration: {}
- name: FILE_NAME_INCORRECT
enabled: true
configuration: {}
- name: FILE_NAME_MATCH_CLASS
enabled: true
configuration: {}
- name: FUNCTION_BOOLEAN_PREFIX
enabled: true
configuration: {}
- name: FUNCTION_NAME_INCORRECT_CASE
enabled: true
configuration: {}
- name: GENERIC_NAME
enabled: true
configuration: {}
- name: IDENTIFIER_LENGTH
enabled: true
configuration: {}
- name: OBJECT_NAME_INCORRECT
enabled: true
configuration: {}
- name: PACKAGE_NAME_INCORRECT_CASE
enabled: true
configuration: {}
- name: PACKAGE_NAME_INCORRECT_PREFIX
enabled: true
configuration: {}
- name: PACKAGE_NAME_INCORRECT_SYMBOLS
enabled: true
configuration: {}
- name: PACKAGE_NAME_INCORRECT_PATH
enabled: true
configuration: {}
- name: PACKAGE_NAME_MISSING
enabled: true
configuration: {}
- name: VARIABLE_HAS_PREFIX
enabled: true
configuration: {}
- name: VARIABLE_NAME_INCORRECT
enabled: true
configuration: {}
- name: VARIABLE_NAME_INCORRECT_FORMAT
enabled: true
configuration: {}
- name: MISSING_KDOC_ON_FUNCTION
enabled: true
configuration: {}
- name: MISSING_KDOC_TOP_LEVEL
enabled: true
configuration: {}
- name: MISSING_KDOC_CLASS_ELEMENTS
enabled: true
configuration: {}
- name: BLANK_LINE_AFTER_KDOC
enabled: true
configuration: {}
- name: KDOC_WITHOUT_PARAM_TAG
enabled: true
configuration: {}
- name: KDOC_WITHOUT_RETURN_TAG
enabled: true
configuration: {}
- name: KDOC_WITHOUT_THROWS_TAG
enabled: true
configuration: {}
- name: KDOC_EMPTY_KDOC
enabled: true
configuration: {}
- name: INCORRECT_PACKAGE_SEPARATOR
enabled: true
configuration: {}
- name: KDOC_NO_DEPRECATED_TAG
enabled: true
configuration: {}
- name: KDOC_NO_EMPTY_TAGS
enabled: true
configuration: {}
- name: KDOC_WRONG_SPACES_AFTER_TAG
enabled: true
configuration: {}
- name: KDOC_WRONG_TAGS_ORDER
enabled: true
configuration: {}
- name: KDOC_NO_NEWLINES_BETWEEN_BASIC_TAGS
enabled: true
configuration: {}
- name: KDOC_NEWLINES_BEFORE_BASIC_TAGS
enabled: true
configuration: {}
- name: KDOC_NO_NEWLINE_AFTER_SPECIAL_TAGS
enabled: true
configuration: {}
- name: KDOC_TRIVIAL_KDOC_ON_FUNCTION
enabled: 'true'
configuration: {}
- name: HEADER_WRONG_FORMAT
enabled: true
configuration: {}
- name: HEADER_MISSING_IN_NON_SINGLE_CLASS_FILE
enabled: true
configuration: {}
- name: HEADER_MISSING_OR_WRONG_COPYRIGHT
enabled: true
configuration:
isCopyrightMandatory: false
copyrightText: ''
- name: HEADER_NOT_BEFORE_PACKAGE
enabled: true
configuration: {}
- name: HEADER_CONTAINS_DATE_OR_AUTHOR
enabled: true
configuration: {}
- name: FILE_IS_TOO_LONG
enabled: true
configuration:
maxSize: '2000'
ignoreFolders: ''
- name: COMMENTED_OUT_CODE
enabled: true
configuration: {}
- name: FILE_CONTAINS_ONLY_COMMENTS
enabled: true
configuration: {}
- name: FILE_UNORDERED_IMPORTS
enabled: true
configuration: {}
- name: FILE_INCORRECT_BLOCKS_ORDER
enabled: true
configuration: {}
- name: FILE_NO_BLANK_LINE_BETWEEN_BLOCKS
enabled: true
configuration: {}
# Check: warns if wildcard imports are used except allows. (e.g. import org.cqfn.diktat.*)
- name: FILE_WILDCARD_IMPORTS
enabled: true
configuration:
allowedWildcards: "" # Allowed wildcards for imports (e.g. "import org.cqfn.diktat.*, import org.jetbrains.kotlin.*")
- name: NO_BRACES_IN_CONDITIONALS_AND_LOOPS
enabled: true
configuration: {}
- name: WRONG_ORDER_IN_CLASS_LIKE_STRUCTURES
enabled: true
configuration: {}
- name: BLANK_LINE_BETWEEN_PROPERTIES
enabled: true
configuration: {}
- name: BRACES_BLOCK_STRUCTURE_ERROR
enabled: true
configuration:
openBraceNewline: 'True'
closeBraceNewline: 'True'
- name: WRONG_INDENTATION
enabled: true
configuration:
newlineAtEnd: true
extendedIndentOfParameters: true
alignedParameters: true
extendedIndentAfterOperators: true
- name: EMPTY_BLOCK_STRUCTURE_ERROR
enabled: true
configuration:
styleEmptyBlockWithNewline: 'True'
allowEmptyBlocks: 'False'
- name: MORE_THAN_ONE_STATEMENT_PER_LINE
enabled: true
configuration: {}
- name: LONG_LINE
enabled: true
configuration:
lineLength: '120'
- name: REDUNDANT_SEMICOLON
enabled: true
configuration: {}
- name: WRONG_NEWLINES
enabled: true
configuration: {}
- name: TOO_MANY_CONSECUTIVE_SPACES
enabled: true
configuration:
max_spaces: '1'
saveInitialFormattingForEnums: false
- name: TOO_MANY_BLANK_LINES
enabled: true
configuration: {}
- name: WRONG_WHITESPACE
enabled: true
configuration: {}
- name: BACKTICKS_PROHIBITED
enabled: true
configuration: {}
- name: STRING_CONCATENATION
enabled: true
configuration: {}
- name: WHEN_WITHOUT_ELSE
enabled: true
configuration: {}
- name: ANNOTATION_NEW_LINE
enabled: true
configuration: {}
- name: ENUMS_SEPARATED
enabled: true
configuration: {}
- name: LONG_NUMERICAL_VALUES_SEPARATED
enabled: true
configuration:
maxNumberLength: '5'
maxBlockLength: '3'
- name: WRONG_DECLARATIONS_ORDER
enabled: true
configuration:
sortEnum: true
sortProperty: true
- name: WRONG_MULTIPLE_MODIFIERS_ORDER
enabled: true
configuration: {}
- name: CONFUSING_IDENTIFIER_NAMING
enabled: true
configuration: {}
- name: WRONG_COPYRIGHT_YEAR
enabled: true
configuration: {}
# Inspection that checks if local variables are declared close to the first usage site
- name: LOCAL_VARIABLE_EARLY_DECLARATION
enabled: true
configuration: {}
# Type aliases provide alternative names for existing types when type's reference text is longer 25 chars
- name: TYPE_ALIAS
enabled: true
configuration:
typeReferenceLength: '25' # max length of type reference