From commits-return-9779-archive-asf-public=cust-asf.ponee.io@fineract.apache.org Tue Jun 2 20:30:37 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 5F58F18064C for ; Tue, 2 Jun 2020 22:30:37 +0200 (CEST) Received: (qmail 82421 invoked by uid 500); 2 Jun 2020 20:30:36 -0000 Mailing-List: contact commits-help@fineract.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@fineract.apache.org Delivered-To: mailing list commits@fineract.apache.org Received: (qmail 82412 invoked by uid 99); 2 Jun 2020 20:30:36 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Jun 2020 20:30:36 +0000 From: =?utf-8?q?GitBox?= To: commits@fineract.apache.org Subject: =?utf-8?q?=5BGitHub=5D_=5Bfineract=5D_vorburger_commented_on_a_change_in_pul?= =?utf-8?q?l_request_=23943=3A_FINERACT-1006_Added_spotless_to_auto_format_s?= =?utf-8?q?ource_code?= Message-ID: <159112983662.10999.2493162388596653385.asfpy@gitbox.apache.org> Date: Tue, 02 Jun 2020 20:30:36 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit In-Reply-To: References: 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