Skip to content

Commit 935ae3c

Browse files
vanniktechakarnokd
authored andcommitted
Add Checkstyle for Trailing Whitespace (#4497)
1 parent 35281d5 commit 935ae3c

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

build.gradle

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
buildscript {
22
repositories { jcenter() }
3-
dependencies {
4-
classpath 'com.netflix.nebula:gradle-rxjava-project-plugin:4.0.0'
3+
dependencies {
4+
classpath 'com.netflix.nebula:gradle-rxjava-project-plugin:4.0.0'
55
classpath 'ru.vyarus:gradle-animalsniffer-plugin:1.1.0'
66
}
77
}
@@ -13,6 +13,7 @@ description = 'RxJava: Reactive Extensions for the JVM – a library for composi
1313
apply plugin: 'java'
1414
// apply plugin: 'pmd'
1515
apply plugin: 'findbugs'
16+
apply plugin: 'checkstyle'
1617
apply plugin: 'jacoco'
1718
apply plugin: 'ru.vyarus.animalsniffer'
1819
apply plugin: 'nebula.rxjava-project'
@@ -120,6 +121,10 @@ build.dependsOn jacocoTestReport
120121

121122
// build.dependsOn pmdPrint
122123

124+
checkstyle {
125+
configFile file('checkstyle.xml')
126+
}
127+
123128
findbugs {
124129
ignoreFailures true
125130
toolVersion = '3.0.1'

checkstyle.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0"?>
2+
<!DOCTYPE module PUBLIC
3+
"-//Puppy Crawl//DTD Check Configuration 1.2//EN"
4+
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
5+
<module name="Checker">
6+
<module name="TreeWalker">
7+
<module name="RegexpSinglelineJava">
8+
<property name="format" value="^(?!\s+\* $).*?\s+$"/>
9+
<property name="message" value="Line has trailing spaces."/>
10+
</module>
11+
</module>
12+
</module>

0 commit comments

Comments
 (0)