-
Notifications
You must be signed in to change notification settings - Fork 12
/
codenarc.groovy
59 lines (58 loc) · 2.01 KB
/
codenarc.groovy
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
ruleset {
description 'CrateKube codenarc ruleset'
ruleset('rulesets/basic.xml')
ruleset('rulesets/braces.xml')
ruleset('rulesets/concurrency.xml')
ruleset('rulesets/convention.xml') {
'NoDef' enabled: false
'TrailingComma' enabled: false
'VariableTypeRequired' enabled: false
'MethodReturnTypeRequired' enabled: false
'StaticFieldsBeforeInstanceFields' enabled: false
'StaticMethodsBeforeInstanceMethods' enabled: false
'PublicMethodsBeforeNonPublicMethods' enabled: false
}
ruleset('rulesets/design.xml')
ruleset('rulesets/dry.xml') {
'DuplicateListLiteral' doNotApplyToFilesMatching: /.*(Spec|Test)\.groovy/
'DuplicateMapLiteral' doNotApplyToFilesMatching: /.*(Spec|Test)\.groovy/
'DuplicateNumberLiteral' doNotApplyToFilesMatching: /.*(Spec|Test)\.groovy/
'DuplicateStringLiteral' doNotApplyToFilesMatching: /.*(Spec|Test)\.groovy/
}
ruleset('rulesets/exceptions.xml')
ruleset('rulesets/formatting.xml') {
'ClassJavadoc' enabled: false
'LineLength' enabled: false
'Indentation' enabled: false
'SpaceAfterOpeningBrace' enabled: false
'SpaceBeforeClosingBrace' enabled: false
'SpaceAroundMapEntryColon' enabled: false
}
ruleset('rulesets/generic.xml')
ruleset('rulesets/groovyism.xml')
ruleset('rulesets/imports.xml') {
'MisorderedStaticImports' enabled: false
'UnusedImport' enabled: false
}
ruleset('rulesets/jdbc.xml')
ruleset('rulesets/logging.xml')
ruleset('rulesets/naming.xml') {
'ClassName' regex: /^[A-Z][$\a-zA-Z0-9]*$/
'FactoryMethodName' enabled: false
'MethodName' enabled: false
}
ruleset('rulesets/security.xml') {
'JavaIoPackageAccess' enabled: false
}
ruleset('rulesets/serialization.xml')
ruleset('rulesets/size.xml') {
'CrapMetric' enabled: false
'ParameterCount' enabled: false
}
ruleset('rulesets/unnecessary.xml') {
'UnnecessaryReturnKeyword' enabled: false
}
ruleset('rulesets/unused.xml') {
'UnusedObject' doNotApplyToFilesMatching: /.*(Spec|Test)\.groovy/
}
}