You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by pr...@apache.org on 2018/04/03 22:05:08 UTC
[geode] branch develop updated: Geode-4950 + GEODE-4951: Upgrade
spotless version and reduce run time.
This is an automated email from the ASF dual-hosted git repository.
prhomberg pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git
The following commit(s) were added to refs/heads/develop by this push:
new caf588b Geode-4950 + GEODE-4951: Upgrade spotless version and reduce run time.
caf588b is described below
commit caf588ba2db2a1600a48bfbd55d00915936865f0
Author: Patrick Rhomberg <pr...@pivotal.io>
AuthorDate: Tue Apr 3 15:04:59 2018 -0700
Geode-4950 + GEODE-4951: Upgrade spotless version and reduce run time.
* GEODE-4950: Update spotless plugin to newest version.
* GEODE-4951: Allow spotless to skip UP-TO-DATE files.
---
build.gradle | 2 +-
gradle/spotless.gradle | 27 ++++++++++++++++-----------
2 files changed, 17 insertions(+), 12 deletions(-)
diff --git a/build.gradle b/build.gradle
index 66c89ec..cd76ede 100755
--- a/build.gradle
+++ b/build.gradle
@@ -25,7 +25,7 @@ buildscript {
classpath "gradle.plugin.org.nosphere.apache:creadur-rat-gradle:0.2.0"
classpath 'com.bmuschko:gradle-nexus-plugin:2.3.1'
classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.0.1'
- classpath "com.diffplug.gradle.spotless:spotless:2.2.0"
+ classpath "com.diffplug.spotless:spotless-plugin-gradle:3.10.0"
classpath "me.champeau.gradle:jmh-gradle-plugin:0.3.1"
classpath "com.pedjak.gradle.plugins:dockerized-test:0.5.4"
classpath 'com.github.ben-manes:gradle-versions-plugin:0.17.0'
diff --git a/gradle/spotless.gradle b/gradle/spotless.gradle
index 6dedef0..cd3d9e9 100644
--- a/gradle/spotless.gradle
+++ b/gradle/spotless.gradle
@@ -25,24 +25,17 @@ subprojects {
exclude '**/generated-src/**'
}
+ // As the method name suggests, bump this number if any of the below "custom" rules change.
+ // Spotless will not run on unchanged files unless this number changes.
+ bumpThisNumberIfACustomStepChanges(0)
+
custom 'Remove commented-out import statements', {
it.replaceAll(/\n\/\/ import .*?;.*/, '')
}
- custom 'End files with a single blank line', {
- it.replaceAll(/\s+$/, '\n')
- }
-
- // Removes end-of-line whitespace
- trimTrailingWhitespace()
-
// Enforce style import order
importOrderFile "${project(':geode-core').projectDir}/../etc/eclipseOrganizeImports.importorder"
- // The formatter is relative to geode-core and not the root project as the root project would change
- // if Geode and submodules are included as part of a different gradle project.
- eclipseFormatFile "${project(':geode-core').projectDir}/../etc/eclipse-java-google-style.xml"
-
// Enforce style modifier order
custom 'Modifier ordering', {
def modifierRanking = [
@@ -70,6 +63,18 @@ subprojects {
}
)
}
+
+
+ // Notes on eclipse formatter version:
+ // 4.6.3 is consistent with existing / previous behavior.
+ // 4.7.1 works, but had different default whitespace rules, notably with mid-ternary linebreak.
+ // 4.7.2 exists but is currently incompatible with our style file, raising NPEs.
+
+ // The format file is relative to geode-core and not the root project as the root project would change
+ // if Geode and submodules are included as part of a different gradle project.
+ eclipse('4.6.3').configFile "${project(':geode-core').projectDir}/../etc/eclipse-java-google-style.xml"
+ trimTrailingWhitespace()
+ endWithNewline()
}
}
}
--
To stop receiving notification emails like this one, please contact
prhomberg@apache.org.