Skip to content

2.x: Add Checkstyle for Trailing Whitespace #4497

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 8, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
buildscript {
repositories { jcenter() }
dependencies {
classpath 'com.netflix.nebula:gradle-rxjava-project-plugin:4.0.0'
dependencies {
classpath 'com.netflix.nebula:gradle-rxjava-project-plugin:4.0.0'
classpath 'ru.vyarus:gradle-animalsniffer-plugin:1.1.0'
}
}
Expand All @@ -13,6 +13,7 @@ description = 'RxJava: Reactive Extensions for the JVM – a library for composi
apply plugin: 'java'
// apply plugin: 'pmd'
apply plugin: 'findbugs'
apply plugin: 'checkstyle'
apply plugin: 'jacoco'
apply plugin: 'ru.vyarus.animalsniffer'
apply plugin: 'nebula.rxjava-project'
Expand Down Expand Up @@ -120,6 +121,10 @@ build.dependsOn jacocoTestReport

// build.dependsOn pmdPrint

checkstyle {
configFile file('checkstyle.xml')
}

findbugs {
ignoreFailures true
toolVersion = '3.0.1'
Expand Down
12 changes: 12 additions & 0 deletions checkstyle.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.2//EN"
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
<module name="Checker">
<module name="TreeWalker">
<module name="RegexpSinglelineJava">
<property name="format" value="^(?!\s+\* $).*?\s+$"/>
<property name="message" value="Line has trailing spaces."/>
</module>
</module>
</module>