|
| 1 | +<!-- |
| 2 | + ~ Copyright 2017 the original author or authors. |
| 3 | + ~ |
| 4 | + ~ Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | + ~ you may not use this file except in compliance with the License. |
| 6 | + ~ You may obtain a copy of the License at |
| 7 | + ~ |
| 8 | + ~ http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | + ~ |
| 10 | + ~ Unless required by applicable law or agreed to in writing, software |
| 11 | + ~ distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | + ~ See the License for the specific language governing permissions and |
| 14 | + ~ limitations under the License. |
| 15 | + --> |
| 16 | +<ruleset xmlns="http://codenarc.org/ruleset/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 17 | + xsi:schemaLocation="http://codenarc.org/ruleset/1.0 http://codenarc.org/ruleset-schema.xsd" |
| 18 | + xsi:noNamespaceSchemaLocation="http://codenarc.org/ruleset-schema.xsd"> |
| 19 | + <ruleset-ref path='rulesets/braces.xml'/> |
| 20 | + <ruleset-ref path='rulesets/imports.xml'> |
| 21 | + <exclude name="ImportFromSunPackages"/> |
| 22 | + <exclude name="MisorderedStaticImports"/> |
| 23 | + <exclude name="NoWildcardImports"/> |
| 24 | + </ruleset-ref> |
| 25 | + <ruleset-ref path='rulesets/naming.xml'> |
| 26 | + <rule-config name='ClassName'> |
| 27 | + <property name='regex' value='^[A-Z][\$a-zA-Z0-9_]*$'/> |
| 28 | + </rule-config> |
| 29 | + <rule-config name='FieldName'> |
| 30 | + <property name='finalRegex' value='^[a-z][a-zA-Z0-9]*$'/> |
| 31 | + <property name='staticFinalRegex' value='^logger$|^[A-Z][A-Z_0-9]*$|^serialVersionUID$'/> |
| 32 | + </rule-config> |
| 33 | + <rule-config name='MethodName'> |
| 34 | + <property name='regex' value='^[a-z][\$_a-zA-Z0-9]*$|^.*\s.*$'/> |
| 35 | + </rule-config> |
| 36 | + <rule-config name='VariableName'> |
| 37 | + <property name='finalRegex' value='^[a-z][a-zA-Z0-9]*$'/> |
| 38 | + </rule-config> |
| 39 | + <exclude name="ConfusingMethodName"/> |
| 40 | + <exclude name="FactoryMethodName"/> |
| 41 | + <exclude name="ClassNameSameAsSuperclass"/> |
| 42 | + </ruleset-ref> |
| 43 | +</ruleset> |
0 commit comments