fineract-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [fineract] vorburger commented on a change in pull request #943: FINERACT-1006 Added spotless to auto format source code
Date Tue, 02 Jun 2020 20:30:36 GMT

vorburger commented on a change in pull request #943:
URL: https://github.com/apache/fineract/pull/943#discussion_r434130301



##########
File path: README.md
##########
@@ -195,10 +195,19 @@ Instructions to run Apache RAT (Release Audit Tool)
 2. Run `./gradlew rat`. A report will be generated under build/reports/rat/rat-report.txt
 
 
-Checkstyle
+Checkstyle and Spotless
 ============
 
-This project enforces its code conventions using [checkstyle.xml](fineract-provider/config/checkstyle/checkstyle.xml).
 It is configured to run automatically during the normal Gradle build, and fail if there are
any style violations detected.
+This project enforces its code conventions using [checkstyle.xml](fineract-provider/config/checkstyle/checkstyle.xml)
through Checkstyle and [google-checks](config/google-checks-updated.xml) through Spotless.
They are configured to run automatically during the normal Gradle build, and fail if there
are any violations detected. You can run the following command to automatically fix spotless
violations 
+
+    `./gradlew spotlessApply`
+
+Since some checks are present in both Checkstyle and Spoltess, the same command can help
you fix some of the checkstyle violations, but other checkstyle violations need to fixed manually.

Review comment:
       typo (Spoltess/Spotless) + minor style improvement suggestion
   
   ```suggestion
   Since some checks are present in both Checkstyle and Spotless, the same command can help
you fix some of the Checkstyle violations (but not all, other Checkstyle violations need to
fixed manually).
   ```

##########
File path: fineract-provider/build.gradle
##########
@@ -48,6 +48,7 @@ buildscript {
         classpath "gradle.plugin.com.github.andygoossens:gradle-modernizer-plugin:1.3.0"
         classpath "gradle.plugin.com.gorylenko.gradle-git-properties:gradle-git-properties:2.2.2"
         classpath "net.ltgt.gradle:gradle-errorprone-plugin:1.1.1"
+        classpath "com.diffplug.spotless:spotless-plugin-gradle:4.0.1"

Review comment:
       do you want to switch to using the latest already in this PR? (Renovate would probably
propose to automatically upgrade it soon anyway, but why not start with the very latest here?)
   
   ```suggestion
           classpath "com.diffplug.spotless:spotless-plugin-gradle:4.1.0"
   ```

##########
File path: README.md
##########
@@ -195,10 +195,19 @@ Instructions to run Apache RAT (Release Audit Tool)
 2. Run `./gradlew rat`. A report will be generated under build/reports/rat/rat-report.txt
 
 
-Checkstyle
+Checkstyle and Spotless
 ============
 
-This project enforces its code conventions using [checkstyle.xml](fineract-provider/config/checkstyle/checkstyle.xml).
 It is configured to run automatically during the normal Gradle build, and fail if there are
any style violations detected.
+This project enforces its code conventions using [checkstyle.xml](fineract-provider/config/checkstyle/checkstyle.xml)
through Checkstyle and [google-checks](config/google-checks-updated.xml) through Spotless.
They are configured to run automatically during the normal Gradle build, and fail if there
are any violations detected. You can run the following command to automatically fix spotless
violations 

Review comment:
       super minor "nit pick" (which you can also address in a follow-up PR), the doc is missing
a semi-colon here:
   
   ```suggestion
   This project enforces its code conventions using [checkstyle.xml](fineract-provider/config/checkstyle/checkstyle.xml)
through Checkstyle and [google-checks](config/google-checks-updated.xml) through Spotless.
They are configured to run automatically during the normal Gradle build, and fail if there
are any violations detected. You can run the following command to automatically fix spotless
violations:
   ```

##########
File path: README.md
##########
@@ -195,10 +195,19 @@ Instructions to run Apache RAT (Release Audit Tool)
 2. Run `./gradlew rat`. A report will be generated under build/reports/rat/rat-report.txt
 
 
-Checkstyle
+Checkstyle and Spotless
 ============
 
-This project enforces its code conventions using [checkstyle.xml](fineract-provider/config/checkstyle/checkstyle.xml).
 It is configured to run automatically during the normal Gradle build, and fail if there are
any style violations detected.
+This project enforces its code conventions using [checkstyle.xml](fineract-provider/config/checkstyle/checkstyle.xml)
through Checkstyle and [google-checks](config/google-checks-updated.xml) through Spotless.
They are configured to run automatically during the normal Gradle build, and fail if there
are any violations detected. You can run the following command to automatically fix spotless
violations 
+
+    `./gradlew spotlessApply`
+
+Since some checks are present in both Checkstyle and Spoltess, the same command can help
you fix some of the checkstyle violations, but other checkstyle violations need to fixed manually.
+
+You can run the following command to check for Spotless violations

Review comment:
       Perhaps useful to re-clarify & repeat here what I know you basically already wrote
above, but just to make it extra clear:
   
   ```suggestion
   You can also check for Spotless violations (only; but normally don't have to, because the
regular build full already includes this anyway):
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



Mime
View raw message