aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorKenny Root <kenny@the-b.org>2014-10-01 23:44:57 +0100
committerKenny Root <kenny@the-b.org>2014-10-01 17:26:23 +0100
commitac85ede9a3df280ad62df90800e1a9dc9af6290d (patch)
tree9ab5b28e676706f1f14cd4c81a35bf965db8277d /config
parent321901b580447612d466e9411115073b754a5abb (diff)
downloadconnectbot-ac85ede9a3df280ad62df90800e1a9dc9af6290d.tar.gz
connectbot-ac85ede9a3df280ad62df90800e1a9dc9af6290d.tar.bz2
connectbot-ac85ede9a3df280ad62df90800e1a9dc9af6290d.zip
Add Checkstyle checks
Diffstat (limited to 'config')
-rw-r--r--config/quality.gradle16
-rw-r--r--config/quality/checkstyle/checkstyle.xml14
2 files changed, 30 insertions, 0 deletions
diff --git a/config/quality.gradle b/config/quality.gradle
new file mode 100644
index 0000000..f93b4a1
--- /dev/null
+++ b/config/quality.gradle
@@ -0,0 +1,16 @@
+apply plugin: 'checkstyle'
+
+check.dependsOn 'checkstyle'
+
+task checkstyle(type: Checkstyle) {
+ configFile file("${project.rootDir}/config/quality/checkstyle/checkstyle.xml")
+
+ source 'src/main/java'
+ include 'org/connectbot/**/*.java'
+ exclude '**/gen/**'
+
+ def configProps = ['proj.module.dir': projectDir.absolutePath]
+ configProperties configProps
+
+ classpath = files()
+}
diff --git a/config/quality/checkstyle/checkstyle.xml b/config/quality/checkstyle/checkstyle.xml
new file mode 100644
index 0000000..aa27675
--- /dev/null
+++ b/config/quality/checkstyle/checkstyle.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<!DOCTYPE module PUBLIC
+ "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
+ "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
+<module name="Checker">
+ <module name="TreeWalker">
+ <property name="fileExtensions" value="java"/>
+ <module name="RegexpSinglelineJava">
+ <property name="format" value="^\t* +\t*\S"/>
+ <property name="message" value="Line has leading space characters; indentation should be performed with tabs only."/>
+ <property name="ignoreComments" value="true"/>
+ </module>
+ </module>
+</module>