-
Notifications
You must be signed in to change notification settings - Fork 0
/
diktat.yml
175 lines (175 loc) · 4.89 KB
/
diktat.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
- name: DIKTAT_COMMON
enabled: true
configuration:
domainName: org.jetbrains.research.code.submissions.clustering
kotlinVersion: 1.6
srcDirectories: "main"
testDirs: "test,nativeTest,commonTest"
- name: PARAMETER_NAME_IN_OUTER_LAMBDA
enabled: false
- name: ENUM_VALUE
enabled: true
configuration:
enumStyle: snakeCase
- name: KDOC_CONTAINS_DATE_OR_AUTHOR
enabled: false
configuration:
versionRegex: \d+\.\d+\.\d+[-.\w\d]*
- name: HEADER_MISSING_OR_WRONG_COPYRIGHT
enabled: true
configuration:
isCopyrightMandatory: false
copyrightText: ''
- name: FILE_IS_TOO_LONG
enabled: true
configuration:
maxSize: 2000
ignoreFolders: ''
- name: FILE_UNORDERED_IMPORTS
enabled: true
configuration:
useRecommendedImportsOrder: true
- name: FILE_WILDCARD_IMPORTS
enabled: false
configuration:
allowedWildcards: "org.jetbrains.kotlin.psi.*"
- name: BRACES_BLOCK_STRUCTURE_ERROR
enabled: true
configuration:
openBraceNewline: true
closeBraceNewline: true
- name: WRONG_INDENTATION
enabled: true
configuration:
# Is newline at the end of a file needed
newlineAtEnd: true
# If true: in parameter list when parameters are split by newline they are indented with two indentations instead of one
extendedIndentOfParameters: false
# If true: if first parameter in parameter list is on the same line as opening parenthesis, then other parameters can be aligned with it
alignedParameters: true
# If true: if expression is split by newline after operator like +/-/`*`, then the next line is indented with two indentations instead of one
extendedIndentAfterOperators: false
# If true: when dot qualified expression starts on a new line, this line will be indented with two indentations instead of one
extendedIndentBeforeDot: false
# The indentation size for each file
indentationSize: 4
- name: EMPTY_BLOCK_STRUCTURE_ERROR
enabled: true
configuration:
styleEmptyBlockWithNewline: true
allowEmptyBlocks: false
- name: LONG_LINE
enabled: true
configuration:
lineLength: 180
- name: WRONG_NEWLINES
enabled: true
configuration:
maxParametersInOneLine: 3
- name: TOO_MANY_CONSECUTIVE_SPACES
enabled: true
configuration:
maxSpaces: 1
saveInitialFormattingForEnums: false
- name: LONG_NUMERICAL_VALUES_SEPARATED
enabled: true
configuration:
maxNumberLength: 5
maxBlockLength: 3
- name: WRONG_DECLARATIONS_ORDER
enabled: true
configuration:
sortEnum: true
sortProperty: true
- name: COMMENT_WHITE_SPACE
enabled: true
configuration:
maxSpacesBeforeComment: 2
maxSpacesInComment: 1
- name: TYPE_ALIAS
enabled: true
configuration:
typeReferenceLength: 25
- name: TOO_LONG_FUNCTION
enabled: true
configuration:
maxFunctionLength: 35 # max length of function
isIncludeHeader: false # count function's header
- name: TOO_MANY_PARAMETERS
enabled: true
configuration:
maxParameterListSize: 5
- name: NESTED_BLOCK
enabled: true
configuration:
maxNestedBlockQuantity: 4
- name: TRAILING_COMMA
enabled: true
configuration:
valueArgument: true
valueParameter: true
- name: MISSING_KDOC_ON_FUNCTION
enabled: false
- name: MISSING_KDOC_CLASS_ELEMENTS
enabled: false
- name: MISSING_KDOC_TOP_LEVEL
enabled: false
- name: WHEN_WITHOUT_ELSE
enabled: false
- name: HEADER_MISSING_IN_NON_SINGLE_CLASS_FILE
enabled: false
- name: VARIABLE_HAS_PREFIX
enabled: false
- name: AVOID_USING_UTILITY_CLASS
enabled: false
- name: CUSTOM_GETTERS_SETTERS
enabled: false
# https://github.com/diktat-static-analysis/diKTat/issues/1106
- name: TRAILING_COMMA
enabled: false
# https://github.com/diktat-static-analysis/diKTat/issues/1109
- name: VARIABLE_NAME_INCORRECT_FORMAT
enabled: false
# disabled due to: https://github.com/diktat-static-analysis/diKTat/issues/1090
- name: GENERIC_VARIABLE_WRONG_DECLARATION
enabled: false
# disabled due to: https://github.com/diktat-static-analysis/diKTat/issues/1091
- name: COMMENTED_OUT_CODE
enabled: false
# disabled because IDEA already tracks imports well
- name: FILE_UNORDERED_IMPORTS
enabled: false
- name: KDOC_WITHOUT_RETURN_TAG
enabled: false
- name: EXTENSION_FUNCTION_WITH_CLASS
enabled: false
- name: IDENTIFIER_LENGTH
enabled: false
- name: PACKAGE_NAME_INCORRECT_PREFIX
enabled: false
- name: KDOC_NO_CONSTRUCTOR_PROPERTY
enabled: false
- name: TOP_LEVEL_ORDER
enabled: false
- name: PACKAGE_NAME_INCORRECT_PATH
enabled: false
- name: PACKAGE_NAME_MISSING
enabled: false
- name: LOCAL_VARIABLE_EARLY_DECLARATION
enabled: false
- name: WRONG_INDENTATION
enabled: false
- name: CONSTANT_UPPERCASE
enabled: false
- name: MAGIC_NUMBER
enabled: false
- name: STRING_TEMPLATE_QUOTES
enabled: false
- name: NO_BRACES_IN_CONDITIONALS_AND_LOOPS
enabled: false
- name: FUNCTION_BOOLEAN_PREFIX
enabled: false
- name: EMPTY_BLOCK_STRUCTURE_ERROR
enabled: false
- name: AVOID_NULL_CHECKS
enabled: false