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
|
<ruleset xmlns="http://codenarc.org/ruleset/1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://codenarc.org/ruleset/1.0 http://codenarc.org/ruleset-schema.xsd"
xsi:noNamespaceSchemaLocation="http://codenarc.org/ruleset-schema.xsd">
<description>MongoDB Java driver rule set</description>
<ruleset-ref path='rulesets/imports.xml'>
<rule-config name='MisorderedStaticImports'>
<property name='comesBefore' value='false'/>
</rule-config>
<rule-config name='NoWildcardImports'>
<property name='doNotApplyToFilesMatching' value='AsynchronousChannelHelperSmokeTestSpecification.groovy'/>
</rule-config>
</ruleset-ref>
<ruleset-ref path='rulesets/basic.xml'>
<exclude name="ComparisonWithSelf"/>
</ruleset-ref>
<ruleset-ref path='rulesets/braces.xml'/>
<ruleset-ref path='rulesets/concurrency.xml'>
<rule-config name='BusyWait'>
<property name='doNotApplyToFileNames' value='AsyncQueryBatchCursorFunctionalSpecification.groovy'/>
</rule-config>
</ruleset-ref>
<ruleset-ref path='rulesets/convention.xml'>
<rule-config name='NoDef'>
<property name='doNotApplyToFilesMatching' value='.*Specification.groovy'/>
</rule-config>
<rule-config name='HashtableIsObsolete'>
<property name='doNotApplyToFileNames' value='MongoClientFactorySpecification.groovy'/>
</rule-config>
<exclude name="TrailingComma"/>
<exclude name="CouldBeSwitchStatement"/>
<exclude name="NoDef"/>
</ruleset-ref>
<ruleset-ref path='rulesets/design.xml'>
<rule-config name='BuilderMethodWithSideEffects'>
<property name='methodNameRegex' value='create.*|build.*'/>
</rule-config>
<rule-config name='Instanceof'>
<property name='doNotApplyToFilesMatching' value='.*Specification.groovy'/>
</rule-config>
</ruleset-ref>
<ruleset-ref path='rulesets/dry.xml'>
<rule-config name='DuplicateListLiteral'>
<property name='doNotApplyToFilesMatching' value='.*Specification.groovy'/>
</rule-config>
<exclude name="DuplicateNumberLiteral"/>
<exclude name="DuplicateStringLiteral"/>
<exclude name="DuplicateMapLiteral"/>
</ruleset-ref>
<ruleset-ref path='rulesets/exceptions.xml'/>
<ruleset-ref path='rulesets/formatting.xml'>
<rule-config name='LineLength'>
<property name='length' value='140'/>
</rule-config>
<!-- this check is failing '})' when it shouldn't -->
<exclude name='SpaceAfterClosingBrace'/>
<exclude name='SpaceBeforeOpeningBrace'/>
<exclude name='SpaceAroundMapEntryColon'/>
<exclude name='ClassJavadoc'/>
<exclude name='BlankLineBeforePackage'/>
<exclude name='ConsecutiveBlankLines'/>
<exclude name='FileEndsWithoutNewline'/>
</ruleset-ref>
<ruleset-ref path='rulesets/generic.xml'/>
<ruleset-ref path='rulesets/groovyism.xml'>
<exclude name="ExplicitCallToEqualsMethod"/>
<exclude name="ExplicitCallToAndMethod"/>
<exclude name="ExplicitCallToEqualsMethod"/>
<exclude name="ExplicitCallToCompareToMethod"/>
<exclude name='GetterMethodCouldBeProperty'/>
</ruleset-ref>
<ruleset-ref path='rulesets/junit.xml'/>
<ruleset-ref path='rulesets/logging.xml'/>
<ruleset-ref path='rulesets/naming.xml'>
<exclude name='MethodName'/>
<exclude name='FactoryMethodName'/>
</ruleset-ref>
<ruleset-ref path='rulesets/security.xml'/>
<ruleset-ref path='rulesets/serialization.xml'/>
<ruleset-ref path='rulesets/size.xml'>
<rule-config name='MethodCount'>
<property name='doNotApplyToFilesMatching' value='.*Specification.groovy'/>
</rule-config>
<rule-config name='ParameterCount'>
<property name='doNotApplyToFilesMatching' value='.*Specification.groovy'/>
</rule-config>
<exclude name='CrapMetric'/>
<exclude name='AbcMetric'/>
<exclude name='MethodSize'/>
</ruleset-ref>
<ruleset-ref path='rulesets/unnecessary.xml'>
<!-- these should be revisted later when we've developed a Groovy style -->
<exclude name='UnnecessaryGetter'/>
<exclude name='UnnecessarySemicolon'/>
<!-- dangerous rule because if you use "with in a then clause of a Spock test, the assertions are not run -->
<exclude name="UnnecessaryObjectReferences"/>
<exclude name="UnnecessaryBigDecimalInstantiation"/>
<exclude name="UnnecessarySetter"/>
</ruleset-ref>
<ruleset-ref path='rulesets/unused.xml'>
<rule-config name='UnusedObject'>
<property name='doNotApplyToFilesMatching' value='.*Specification.groovy'/>
</rule-config>
</ruleset-ref>
</ruleset>
|