diff options
author | ByteHamster <info@bytehamster.com> | 2020-02-02 17:47:41 +0100 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2020-02-02 17:48:30 +0100 |
commit | 8f08bd1f6da579658fba565a736a2823f55ca5d3 (patch) | |
tree | d6adf42fe719459512069ba7be347a90c156797e /config | |
parent | b2fb239853de79e9666f405599bd708f962c3177 (diff) | |
download | AntennaPod-8f08bd1f6da579658fba565a736a2823f55ca5d3.zip |
Enforce method names
Diffstat (limited to 'config')
-rw-r--r-- | config/checkstyle/checkstyle.xml | 13 | ||||
-rw-r--r-- | config/checkstyle/suppressions.xml | 7 |
2 files changed, 17 insertions, 3 deletions
diff --git a/config/checkstyle/checkstyle.xml b/config/checkstyle/checkstyle.xml index 140d3c33f..930db4c6b 100644 --- a/config/checkstyle/checkstyle.xml +++ b/config/checkstyle/checkstyle.xml @@ -4,10 +4,12 @@ "https://checkstyle.org/dtds/configuration_1_3.dtd"> <module name = "Checker"> <property name="charset" value="UTF-8"/> + <property name="severity" value="warning"/> + <property name="fileExtensions" value="java, properties, xml"/> - <property name="severity" value="error"/> - - <property name="fileExtensions" value="java, xml"/> + <module name="SuppressionFilter"> + <property name="file" value="suppressions.xml" /> + </module> <module name="TreeWalker"> <module name="OuterTypeFilename"/> @@ -91,6 +93,11 @@ <property name="tokens" value="VARIABLE_DEF"/> <property name="allowSamelineMultipleAnnotations" value="true"/> </module> + <module name="MethodName"> + <property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9_]*$"/> + <message key="name.invalidPattern" + value="Method name ''{0}'' must match pattern ''{1}''."/> + </module> <module name="SingleLineJavadoc"> <property name="ignoreInlineTags" value="false"/> </module> diff --git a/config/checkstyle/suppressions.xml b/config/checkstyle/suppressions.xml new file mode 100644 index 000000000..8ca46df67 --- /dev/null +++ b/config/checkstyle/suppressions.xml @@ -0,0 +1,7 @@ +<?xml version="1.0"?> +<!DOCTYPE suppressions PUBLIC + "-//Puppy Crawl//DTD Suppressions 1.1//EN" + "http://www.puppycrawl.com/dtds/suppressions_1_1.dtd"> +<suppressions> + <suppress checks="MethodName" files="core/src/test/java/android/util/Log.java" /> +</suppressions> |