-
Notifications
You must be signed in to change notification settings - Fork 3
/
codenarc.groovy
53 lines (53 loc) · 1.81 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
ruleset {
ruleset('rulesets/basic.xml')
ruleset('rulesets/braces.xml') {
'IfStatementBraces' enabled: false
'ElseBlockBraces' enabled: false
}
ruleset('rulesets/concurrency.xml')
ruleset('rulesets/convention.xml') {
'NoDef' enabled: false
}
ruleset('rulesets/design.xml')
ruleset('rulesets/dry.xml') {
'DuplicateStringLiteral' ignoreStrings: ';,\\'
}
ruleset('rulesets/formatting.xml') {
'SpaceAroundMapEntryColon' characterAfterColonRegex: /\s/
'ClassJavadoc' enabled:false
}
ruleset('rulesets/generic.xml')
ruleset('rulesets/groovyism.xml') {
'GetterMethodCouldBeProperty' enabled: false
}
ruleset('rulesets/imports.xml') {
'MisorderedStaticImports' enabled: false
'NoWildcardImports' enabled: false
}
ruleset('rulesets/jdbc.xml')
//ruleset('rulesets/junit.xml')
ruleset('rulesets/logging.xml') {
'Println' enabled: false
'SystemOutPrint' enabled: false
}
ruleset('rulesets/naming.xml') {
'VariableName' finalRegex: "[a-z][a-zA-Z0-9]*"
'MethodName' regex: "[a-z][\\*a-zA-Z ,]*"
}
ruleset('rulesets/security.xml') {
'JavaIoPackageAccess' enabled: false
'SystemExit' enabled: false
'JavaIoPackageAccess' enabled: false
}
//ruleset('rulesets/size.xml')
ruleset('rulesets/unnecessary.xml') {
// disabling due to code narc bug =>
//http://sourceforge.net/tracker/?func=detail&atid=1126573&aid=3524882&group_id=250145
'UnnecessaryPackageReference' enabled: false
'UnnecessaryGString' enabled: false
'UnnecessaryReturnKeyword' enabled: false
//'UnnecessaryElseStatement' enabled: false
'UnnecessaryCollectCall' enabled: false
}
ruleset('rulesets/unused.xml')
}