fineract-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From al...@apache.org
Subject [fineract] branch develop updated: Apply Checkstyle, Errorprone etc. for all Java modules (FINERACT-1171)
Date Tue, 20 Oct 2020 01:00:45 GMT
This is an automated email from the ASF dual-hosted git repository.

aleks pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git


The following commit(s) were added to refs/heads/develop by this push:
     new 354acf3  Apply Checkstyle, Errorprone etc. for all Java modules (FINERACT-1171)
354acf3 is described below

commit 354acf309ea7d87636fab157ab29265182418639
Author: Aleksandar Vidakovic <aleks@apache.org>
AuthorDate: Tue Oct 20 01:09:41 2020 +0200

    Apply Checkstyle, Errorprone etc. for all Java modules (FINERACT-1171)
---
 README.md                                          |   2 +-
 build.gradle                                       | 203 ++++++++++++++++++++-
 config/checkstyle/checkstyle.xml                   |   3 +
 config/checkstyle/suppressions.xml                 |  30 +++
 .../org/apache/fineract/client/util/Calls.java     |   2 +-
 .../fineract/client/util/FineractClient.java       | 108 ++++++++++-
 fineract-provider/build.gradle                     | 187 -------------------
 7 files changed, 338 insertions(+), 197 deletions(-)

diff --git a/README.md b/README.md
index 3a3a0d3..5638f55 100644
--- a/README.md
+++ b/README.md
@@ -208,7 +208,7 @@ Messaging configuration is disabled by default. If you want to enable
it and reg
 Checkstyle and Spotless
 ============
 
-This project enforces its code conventions using [checkstyle.xml](fineract-provider/config/checkstyle/checkstyle.xml)
through Checkstyle and [fineract-formatting-preferences.xml](config/fineract-formatting-preferences.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:
+This project enforces its code conventions using [checkstyle.xml](config/checkstyle/checkstyle.xml)
through Checkstyle and [fineract-formatting-preferences.xml](config/fineract-formatting-preferences.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`
 
diff --git a/build.gradle b/build.gradle
index 4883220..2cead99 100644
--- a/build.gradle
+++ b/build.gradle
@@ -25,6 +25,7 @@ buildscript {
         oltuVersion = '1.0.1'
         fineractJavaProjects = subprojects.findAll{
             [
+                'fineract-api',
                 'fineract-provider',
                 'fineract-client'
             ].contains(it.name)
@@ -42,15 +43,10 @@ buildscript {
 
     dependencies {
         classpath 'com.bmuschko:gradle-cargo-plugin:2.7.1'
-        classpath 'org.zeroturnaround:gradle-jrebel-plugin:1.1.10'
-        classpath 'org.springframework.boot:spring-boot-gradle-plugin:2.3.4.RELEASE'
         classpath 'org.apache.openjpa:openjpa:3.1.2' // when upgrading, also change OpenJPA
version repeated in fineract-provider/build.gradle!
         classpath 'com.radcortez.gradle:openjpa-gradle-plugin:3.1.0'
         classpath "gradle.plugin.com.github.spotbugs.snom:spotbugs-gradle-plugin:4.5.1"
         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.4"
-        classpath "net.ltgt.gradle:gradle-errorprone-plugin:1.3.0"
-        classpath "io.swagger.core.v3:swagger-gradle-plugin:2.1.5"
     }
 }
 
@@ -60,6 +56,11 @@ plugins {
     id 'org.nosphere.apache.rat' version '0.7.0' apply false
     id 'com.github.hierynomus.license' version '0.15.0' apply false
     id 'org.openapi.generator' version '4.3.1' apply false
+    id 'org.zeroturnaround.gradle.jrebel' version '1.1.10' apply false
+    id 'org.springframework.boot' version '2.3.4.RELEASE' apply false
+    id 'net.ltgt.errorprone' version '1.3.0' apply false
+    id 'io.swagger.core.v3.swagger-gradle-plugin' version '2.1.5' apply false
+    id 'com.gorylenko.gradle-git-properties' version '2.2.4' apply false
 }
 
 description = '''\
@@ -80,6 +81,7 @@ allprojects  {
     apply plugin: 'com.diffplug.spotless'
     apply plugin: 'com.github.hierynomus.license'
     apply plugin: 'org.nosphere.apache.rat'
+    apply plugin: 'project-report'
 
     // Configuration for the dependency management plugin
     // https://github.com/spring-gradle-plugins/dependency-management-plugin
@@ -341,6 +343,11 @@ configure(project.fineractJavaProjects) {
 
     apply plugin: 'java-library'
     apply plugin: 'idea'
+    apply plugin: 'checkstyle'
+    apply plugin: 'jacoco'
+    apply plugin: "net.ltgt.errorprone"
+    apply plugin: "com.github.spotbugs"
+    apply plugin: 'com.github.andygoossens.gradle-modernizer-plugin'
 
     /* define the valid syntax level for source files */
     sourceCompatibility = JavaVersion.VERSION_11
@@ -456,6 +463,192 @@ configure(project.fineractJavaProjects) {
             dependsOn(spotlessApply)
         }
     }
+
+    // If we are running Gradle within Eclipse to enhance classes with OpenJPA,
+    // set the classes directory to point to Eclipse's default build directory
+    if (project.hasProperty('env') && project.getProperty('env') == 'eclipse') {
+        sourceSets.main.java.outputDir = file("$projectDir/bin/main")
+    }
+
+    // Configuration for the Checkstyle plugin
+    // https://docs.gradle.org/current/userguide/checkstyle_plugin.html
+    dependencies {
+        checkstyle 'com.puppycrawl.tools:checkstyle:8.36.2'
+        checkstyle 'com.github.sevntu-checkstyle:sevntu-checks:1.37.1'
+    }
+
+    // Configuration for JaCoCo code coverage task
+    // https://www.eclemma.org/jacoco/
+    jacoco {
+        toolVersion = jacocoVersion
+        reportsDir = file("$buildDir/reports/jacoco")
+    }
+
+    jacocoTestReport {
+        reports {
+            html.enabled=true
+            xml.enabled=true
+            html.destination file("${buildDir}/code-coverage")
+        }
+    }
+
+    // Configuration for the errorprone plugin
+    // https://github.com/tbroyer/gradle-errorprone-plugin
+    dependencies {
+        errorprone "com.google.errorprone:error_prone_core:2.4.0"
+    }
+
+    tasks.withType(JavaCompile) {
+        options.errorprone {
+            disableWarningsInGeneratedCode = true
+            excludedPaths = ".*/build/.*"
+            //Todo Remove necessary checks from this list
+            disable(
+                    "UnusedVariable",
+                    "TypeParameterUnusedInFormals",
+                    "JdkObsolete",
+                    "EmptyBlockTag",
+                    "MissingSummary",
+                    "InvalidParam",
+                    "ReturnFromVoid",
+                    "AlmostJavadoc",
+                    "InvalidBlockTag",
+                    )
+            //TODO gradually enable these checks
+            error(
+                    "DefaultCharset",
+                    "RemoveUnusedImports",
+                    "WaitNotInLoop",
+                    "ThreeLetterTimeZoneID",
+                    "VariableNameSameAsType",
+                    "UnnecessaryParentheses",
+                    "MultipleTopLevelClasses",
+                    "MixedMutabilityReturnType",
+                    "MultiVariableDeclaration",
+                    "AssertEqualsArgumentOrderChecker",
+                    "EmptySetMultibindingContributions",
+                    "BigDecimalEquals",
+                    "MixedArrayDimensions",
+                    "PackageLocation",
+                    "UseBinds",
+                    "BadImport",
+                    "IntLongMath",
+                    "FloatCast",
+                    "ReachabilityFenceUsage",
+                    "StreamResourceLeak",
+                    "TruthIncompatibleType",
+                    "ByteBufferBackingArray",
+                    "SameNameButDifferent",
+                    "OrphanedFormatString",
+                    "CatchAndPrintStackTrace",
+                    "ObjectToString",
+                    "StringSplitter",
+                    "AssertThrowsMultipleStatements",
+                    "BoxedPrimitiveConstructor",
+                    "EmptyCatch",
+                    "BoxedPrimitiveEquality",
+                    "SynchronizeOnNonFinalField",
+                    "WildcardImport",
+                    "FutureReturnValueIgnored",
+                    "PrivateConstructorForNoninstantiableModule",
+                    "ClassCanBeStatic",
+                    "ClassNewInstance",
+                    "UnnecessaryStaticImport",
+                    "UnsafeFinalization",
+                    "JodaPlusMinusLong",
+                    "MutableMethodReturnType",
+                    "SwitchDefault",
+                    "VarTypeName",
+                    "ArgumentSelectionDefectChecker",
+                    "CompareToZero",
+                    "InjectOnConstructorOfAbstractClass",
+                    "ImmutableEnumChecker",
+                    "NarrowingCompoundAssignment",
+                    "MissingCasesInEnumSwitch",
+                    "ReferenceEquality",
+                    "UndefinedEquals",
+                    "PublicConstructorForAbstractClass",
+                    "UnescapedEntity",
+                    "ModifyCollectionInEnhancedForLoop",
+                    "NonCanonicalType",
+                    "InvalidInlineTag",
+                    "MutablePublicArray",
+                    "StaticAssignmentInConstructor",
+                    "ProtectedMembersInFinalClass",
+                    "OperatorPrecedence",
+                    "EqualsGetClass",
+                    "EqualsUnsafeCast",
+                    "DoubleBraceInitialization",
+                    "UnnecessaryDefaultInEnumSwitch",
+                    "UnusedNestedClass",
+                    "UnusedMethod",
+                    "ModifiedButNotUsed",
+                    "InconsistentCapitalization",
+                    "MissingOverride",
+                    // "InvalidBlockTag",
+                    // "InconsistentOverloads",
+                    // "MethodCanBeStatic",
+                    // "Var",
+                    // "ConstantField",
+                    // "UnnecessaryDefaultInEnumSwitch",
+                    // "FieldCanBeFinal"
+                    )
+        }
+    }
+
+    // Configuration for spotbugs plugin
+    // https://github.com/spotbugs/spotbugs-gradle-plugin
+
+    // To generate an HTML report instead of XML
+    spotbugs {
+        reportLevel = 'high'
+        showProgress = true
+    }
+    // https://github.com/spotbugs/spotbugs-gradle-plugin/issues/242
+    spotbugsMain {
+        reports {
+            html {
+                enabled = true
+                stylesheet = 'fancy-hist.xsl'
+            }
+        }
+    }
+    spotbugsTest {
+        reports {
+            html {
+                enabled = true
+                stylesheet = 'fancy-hist.xsl'
+            }
+        }
+    }
+    spotbugsIntegrationTest {
+        reports {
+            html {
+                enabled = true
+                stylesheet = 'fancy-hist.xsl'
+            }
+        }
+    }
+
+    // Configuration for the modernizer plugin
+    // https://github.com/andygoossens/gradle-modernizer-plugin
+    modernizer {
+        includeTestClasses = true
+        failOnViolations = true
+
+        violationLogLevel="error"
+
+        javaVersion = project.targetCompatibility
+
+        ignorePackages = []
+        ignoreGeneratedClasses = true
+
+        exclusions = []
+        exclusionPatterns = [
+            // To be removed when https://issues.apache.org/jira/browse/FINERACT-826 is fixed
+            'org/joda/time/.*'
+        ]
+    }
 }
 
 configure(project.fineractPublishProjects) {
diff --git a/config/checkstyle/checkstyle.xml b/config/checkstyle/checkstyle.xml
index d9ac823..9634f88 100644
--- a/config/checkstyle/checkstyle.xml
+++ b/config/checkstyle/checkstyle.xml
@@ -32,6 +32,9 @@
         Checks included in MissingSwitchDefault are handled by ErrorProne
     -->
 
+    <module name="SuppressionFilter">
+        <property name="file" value="${config_loc}/suppressions.xml"/>
+    </module>
     <module name="FileTabCharacter">
         <property name="eachLine" value="true"/>
     </module>
diff --git a/config/checkstyle/suppressions.xml b/config/checkstyle/suppressions.xml
new file mode 100644
index 0000000..8d80797
--- /dev/null
+++ b/config/checkstyle/suppressions.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements. See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership. The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License. You may obtain a copy of the License at
+    http://www.apache.org/licenses/LICENSE-2.0
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied. See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+<!DOCTYPE suppressions PUBLIC
+    "-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN"
+    "https://checkstyle.org/dtds/suppressions_1_2.dtd">
+
+<!--
+    This file contains suppression rules for Checkstyle checks.
+    Ideally only files that cannot be modified (e.g. third-party code)
+    should be added here. All other violations should be fixed.
+-->
+
+<suppressions>
+    <suppress files="[/\\]build[/\\]generated[/\\]" checks=".*"/>
+</suppressions>
diff --git a/fineract-client/src/main/java/org/apache/fineract/client/util/Calls.java b/fineract-client/src/main/java/org/apache/fineract/client/util/Calls.java
index 651aee7..7a4f69f 100644
--- a/fineract-client/src/main/java/org/apache/fineract/client/util/Calls.java
+++ b/fineract-client/src/main/java/org/apache/fineract/client/util/Calls.java
@@ -27,7 +27,7 @@ import retrofit2.Response;
  *
  * @author Michael Vorburger.ch
  */
-public class Calls {
+public final class Calls {
 
     private Calls() {}
 
diff --git a/fineract-client/src/main/java/org/apache/fineract/client/util/FineractClient.java
b/fineract-client/src/main/java/org/apache/fineract/client/util/FineractClient.java
index ac8e618..ef6356e 100644
--- a/fineract-client/src/main/java/org/apache/fineract/client/util/FineractClient.java
+++ b/fineract-client/src/main/java/org/apache/fineract/client/util/FineractClient.java
@@ -23,14 +23,116 @@ import okhttp3.logging.HttpLoggingInterceptor.Level;
 import org.apache.fineract.client.ApiClient;
 import org.apache.fineract.client.auth.ApiKeyAuth;
 import org.apache.fineract.client.auth.HttpBasicAuth;
-import org.apache.fineract.client.services.*;
+import org.apache.fineract.client.services.AccountNumberFormatApi;
+import org.apache.fineract.client.services.AccountTransfersApi;
+import org.apache.fineract.client.services.AccountingClosureApi;
+import org.apache.fineract.client.services.AccountingRulesApi;
+import org.apache.fineract.client.services.AdhocQueryApiApi;
+import org.apache.fineract.client.services.AuditsApi;
+import org.apache.fineract.client.services.AuthenticationHttpBasicApi;
+import org.apache.fineract.client.services.BatchApiApi;
+import org.apache.fineract.client.services.CacheApi;
+import org.apache.fineract.client.services.CashierJournalsApi;
+import org.apache.fineract.client.services.CashiersApi;
+import org.apache.fineract.client.services.CentersApi;
+import org.apache.fineract.client.services.ChargesApi;
+import org.apache.fineract.client.services.ClientApi;
+import org.apache.fineract.client.services.ClientChargesApi;
+import org.apache.fineract.client.services.ClientIdentifierApi;
+import org.apache.fineract.client.services.ClientTransactionApi;
+import org.apache.fineract.client.services.ClientsAddressApi;
+import org.apache.fineract.client.services.CodeValuesApi;
+import org.apache.fineract.client.services.CodesApi;
+import org.apache.fineract.client.services.CurrencyApi;
+import org.apache.fineract.client.services.DataTablesApi;
+import org.apache.fineract.client.services.DefaultApi;
+import org.apache.fineract.client.services.DocumentsApi;
+import org.apache.fineract.client.services.EntityDataTableApi;
+import org.apache.fineract.client.services.EntityFieldConfigurationApi;
+import org.apache.fineract.client.services.ExternalServicesApi;
+import org.apache.fineract.client.services.FetchAuthenticatedUserDetailsApi;
+import org.apache.fineract.client.services.FixedDepositAccountApi;
+import org.apache.fineract.client.services.FixedDepositProductApi;
+import org.apache.fineract.client.services.FloatingRatesApi;
+import org.apache.fineract.client.services.GeneralLedgerAccountApi;
+import org.apache.fineract.client.services.GlobalConfigurationApi;
+import org.apache.fineract.client.services.GroupsApi;
+import org.apache.fineract.client.services.HolidaysApi;
+import org.apache.fineract.client.services.HooksApi;
+import org.apache.fineract.client.services.InterestRateChartApi;
+import org.apache.fineract.client.services.InterestRateSlabAKAInterestBandsApi;
+import org.apache.fineract.client.services.JournalEntriesApi;
+import org.apache.fineract.client.services.ListReportMailingJobHistoryApi;
+import org.apache.fineract.client.services.LoanChargesApi;
+import org.apache.fineract.client.services.LoanCollateralApi;
+import org.apache.fineract.client.services.LoanProductsApi;
+import org.apache.fineract.client.services.LoanReschedulingApi;
+import org.apache.fineract.client.services.LoanTransactionsApi;
+import org.apache.fineract.client.services.LoansApi;
+import org.apache.fineract.client.services.MakerCheckerOr4EyeFunctionalityApi;
+import org.apache.fineract.client.services.MappingFinancialActivitiesToAccountsApi;
+import org.apache.fineract.client.services.MifosxBatchJobsApi;
+import org.apache.fineract.client.services.MixMappingApi;
+import org.apache.fineract.client.services.MixReportApi;
+import org.apache.fineract.client.services.MixTaxonomyApi;
+import org.apache.fineract.client.services.NotesApi;
+import org.apache.fineract.client.services.NotificationApi;
+import org.apache.fineract.client.services.OfficesApi;
+import org.apache.fineract.client.services.PasswordPreferencesApi;
+import org.apache.fineract.client.services.PaymentTypeApi;
+import org.apache.fineract.client.services.PeriodicAccrualAccountingApi;
+import org.apache.fineract.client.services.PermissionsApi;
+import org.apache.fineract.client.services.PocketApi;
+import org.apache.fineract.client.services.ProvisioningCategoryApi;
+import org.apache.fineract.client.services.ProvisioningCriteriaApi;
+import org.apache.fineract.client.services.ProvisioningEntriesApi;
+import org.apache.fineract.client.services.RecurringDepositAccountApi;
+import org.apache.fineract.client.services.RecurringDepositAccountTransactionsApi;
+import org.apache.fineract.client.services.RecurringDepositProductApi;
+import org.apache.fineract.client.services.ReportMailingJobsApi;
+import org.apache.fineract.client.services.ReportsApi;
+import org.apache.fineract.client.services.RolesApi;
+import org.apache.fineract.client.services.RunReportsApi;
+import org.apache.fineract.client.services.SavingsAccountApi;
+import org.apache.fineract.client.services.SavingsChargesApi;
+import org.apache.fineract.client.services.SavingsProductApi;
+import org.apache.fineract.client.services.SchedulerApi;
+import org.apache.fineract.client.services.ScoreCardApi;
+import org.apache.fineract.client.services.SearchApiApi;
+import org.apache.fineract.client.services.SelfAccountTransferApi;
+import org.apache.fineract.client.services.SelfAuthenticationApi;
+import org.apache.fineract.client.services.SelfClientApi;
+import org.apache.fineract.client.services.SelfDividendApi;
+import org.apache.fineract.client.services.SelfLoanProductsApi;
+import org.apache.fineract.client.services.SelfLoansApi;
+import org.apache.fineract.client.services.SelfRunReportApi;
+import org.apache.fineract.client.services.SelfSavingsAccountApi;
+import org.apache.fineract.client.services.SelfScoreCardApi;
+import org.apache.fineract.client.services.SelfServiceRegistrationApi;
+import org.apache.fineract.client.services.SelfShareAccountsApi;
+import org.apache.fineract.client.services.SelfSpmApi;
+import org.apache.fineract.client.services.SelfThirdPartyTransferApi;
+import org.apache.fineract.client.services.SelfUserApi;
+import org.apache.fineract.client.services.SelfUserDetailsApi;
+import org.apache.fineract.client.services.ShareAccountApi;
+import org.apache.fineract.client.services.SpmApiLookUpTableApi;
+import org.apache.fineract.client.services.SpmSurveysApi;
+import org.apache.fineract.client.services.StaffApi;
+import org.apache.fineract.client.services.StandingInstructionsApi;
+import org.apache.fineract.client.services.StandingInstructionsHistoryApi;
+import org.apache.fineract.client.services.TaxComponentsApi;
+import org.apache.fineract.client.services.TaxGroupApi;
+import org.apache.fineract.client.services.TellerCashManagementApi;
+import org.apache.fineract.client.services.UserGeneratedDocumentsApi;
+import org.apache.fineract.client.services.UsersApi;
+import org.apache.fineract.client.services.WorkingDaysApi;
 
 /**
  * Fineract Client Java SDK API entry point. This is recommended to be used instead of {@link
ApiClient}.
  *
  * @author Michael Vorburger.ch
  */
-public class FineractClient {
+public final class FineractClient {
 
     private final ApiClient api;
 
@@ -254,7 +356,7 @@ public class FineractClient {
         return api.createService(serviceClass);
     }
 
-    public static class Builder {
+    public static final class Builder {
 
         private final ApiClient apiClient = new ApiClient();
         private String baseURL;
diff --git a/fineract-provider/build.gradle b/fineract-provider/build.gradle
index 24e09ff..6371222 100644
--- a/fineract-provider/build.gradle
+++ b/fineract-provider/build.gradle
@@ -22,24 +22,12 @@ apply plugin: 'rebel'
 apply plugin: 'war'
 apply plugin: 'org.springframework.boot'
 apply plugin: 'com.bmuschko.cargo'
-apply plugin: 'project-report'
 apply plugin: 'openjpa'
-apply plugin: "com.github.spotbugs"
-apply plugin: 'checkstyle'
-apply plugin: 'com.github.andygoossens.gradle-modernizer-plugin'
-apply plugin: 'jacoco'
 apply plugin: "com.gorylenko.gradle-git-properties"
-apply plugin: "net.ltgt.errorprone"
 apply plugin: "io.swagger.core.v3.swagger-gradle-plugin"
 apply plugin: 'distribution'
 apply plugin: 'signing'
 
-// If we are running Gradle within Eclipse to enhance classes with OpenJPA,
-// set the classes directory to point to Eclipse's default build directory
-if (project.hasProperty('env') && project.getProperty('env') == 'eclipse') {
-    sourceSets.main.java.outputDir = new File(rootProject.projectDir, "fineract-provider/bin/main")
-}
-
 // Configuration for the OpenJPA enhance task
 // https://github.com/radcortez/openjpa-gradle-plugin
 System.setProperty("openjpa.Log", "commons")
@@ -89,21 +77,6 @@ resolve {
 
 resolve.dependsOn prepareInputYaml
 
-// Configuration for JaCoCo code coverage task
-// https://www.eclemma.org/jacoco/
-jacoco {
-    toolVersion = jacocoVersion
-    reportsDir = file("$buildDir/reports/jacoco")
-}
-
-jacocoTestReport {
-    reports {
-        html.enabled=true
-        xml.enabled=true
-        html.destination file("${buildDir}/code-coverage")
-    }
-}
-
 configurations {
     providedRuntime // needed for Spring Boot executable WAR
     providedCompile
@@ -169,25 +142,10 @@ if (project.hasProperty('security') && project.getProperty('security')
== 'oauth
 // Configuration for the modernizer plugin
 // https://github.com/andygoossens/gradle-modernizer-plugin
 modernizer {
-    includeTestClasses = true
-    failOnViolations = true
-
-    violationLogLevel="error"
-
-    javaVersion = project.targetCompatibility
-
-    ignorePackages = []
     ignoreClassNamePatterns = [
         '.*AbstractPersistableCustom',
         '.*EntityTables'
     ]
-    ignoreGeneratedClasses = true
-
-    exclusions = []
-    exclusionPatterns = [
-        // To be removed when https://issues.apache.org/jira/browse/FINERACT-826 is fixed
-        'org/joda/time/.*'
-    ]
 }
 
 compileJava {
@@ -218,110 +176,6 @@ war {
     enabled = true
 }
 
-// Configuration for the errorprone plugin
-// https://github.com/tbroyer/gradle-errorprone-plugin
-dependencies {
-    errorprone "com.google.errorprone:error_prone_core:2.4.0"
-}
-
-tasks.withType(JavaCompile) {
-    options.errorprone {
-        disableWarningsInGeneratedCode = true
-        excludedPaths = ".*/build/.*"
-        //Todo Remove necessary checks from this list
-        disable(
-                "UnusedVariable",
-                "TypeParameterUnusedInFormals",
-                "JdkObsolete",
-                "EmptyBlockTag",
-                "MissingSummary",
-                "InvalidParam",
-                "ReturnFromVoid",
-                "AlmostJavadoc",
-                "InvalidBlockTag",
-                )
-        //TODO gradually enable these checks
-        error(
-                "DefaultCharset",
-                "RemoveUnusedImports",
-                "WaitNotInLoop",
-                "ThreeLetterTimeZoneID",
-                "VariableNameSameAsType",
-                "UnnecessaryParentheses",
-                "MultipleTopLevelClasses",
-                "MixedMutabilityReturnType",
-                "MultiVariableDeclaration",
-                "AssertEqualsArgumentOrderChecker",
-                "EmptySetMultibindingContributions",
-                "BigDecimalEquals",
-                "MixedArrayDimensions",
-                "PackageLocation",
-                "UseBinds",
-                "BadImport",
-                "IntLongMath",
-                "FloatCast",
-                "ReachabilityFenceUsage",
-                "StreamResourceLeak",
-                "TruthIncompatibleType",
-                "ByteBufferBackingArray",
-                "SameNameButDifferent",
-                "OrphanedFormatString",
-                "CatchAndPrintStackTrace",
-                "ObjectToString",
-                "StringSplitter",
-                "AssertThrowsMultipleStatements",
-                "BoxedPrimitiveConstructor",
-                "EmptyCatch",
-                "BoxedPrimitiveEquality",
-                "SynchronizeOnNonFinalField",
-                "WildcardImport",
-                "FutureReturnValueIgnored",
-                "PrivateConstructorForNoninstantiableModule",
-                "ClassCanBeStatic",
-                "ClassNewInstance",
-                "UnnecessaryStaticImport",
-                "UnsafeFinalization",
-                "JodaPlusMinusLong",
-                "MutableMethodReturnType",
-                "SwitchDefault",
-                "VarTypeName",
-                "ArgumentSelectionDefectChecker",
-                "CompareToZero",
-                "InjectOnConstructorOfAbstractClass",
-                "ImmutableEnumChecker",
-                "NarrowingCompoundAssignment",
-                "MissingCasesInEnumSwitch",
-                "ReferenceEquality",
-                "UndefinedEquals",
-                "PublicConstructorForAbstractClass",
-                "UnescapedEntity",
-                "ModifyCollectionInEnhancedForLoop",
-                "NonCanonicalType",
-                "InvalidInlineTag",
-                "MutablePublicArray",
-                "StaticAssignmentInConstructor",
-                "ProtectedMembersInFinalClass",
-                "OperatorPrecedence",
-                "EqualsGetClass",
-                "EqualsUnsafeCast",
-                "DoubleBraceInitialization",
-                "UnnecessaryDefaultInEnumSwitch",
-                "UnusedNestedClass",
-                "UnusedMethod",
-                "ModifiedButNotUsed",
-                "InconsistentCapitalization",
-                "MissingOverride",
-                // "InvalidBlockTag",
-                // "InconsistentOverloads",
-                // "MethodCanBeStatic",
-                // "Var",
-                // "ConstantField",
-                // "UnnecessaryDefaultInEnumSwitch",
-                // "FieldCanBeFinal"
-                )
-    }
-}
-
 // Configuration for the Gradle Cargo plugin
 // https://github.com/bmuschko/gradle-cargo-plugin
 configurations
@@ -416,13 +270,6 @@ test {
     }
 }
 
-// Configuration for the Checkstyle plugin
-// https://docs.gradle.org/current/userguide/checkstyle_plugin.html
-dependencies {
-    checkstyle 'com.puppycrawl.tools:checkstyle:8.36.2'
-    checkstyle 'com.github.sevntu-checkstyle:sevntu-checks:1.37.1'
-}
-
 // Configuration for SQL tasks
 // https://docs.groovy-lang.org/latest/html/api/groovy/sql/Sql.html
 import groovy.sql.Sql
@@ -554,40 +401,6 @@ if( project.hasProperty("fineract.release") ) {
     }
 }
 
-// Configuration for spotbugs plugin
-// https://github.com/spotbugs/spotbugs-gradle-plugin
-
-// To generate an HTML report instead of XML
-spotbugs {
-    reportLevel = 'high'
-    showProgress = true
-}
-// https://github.com/spotbugs/spotbugs-gradle-plugin/issues/242
-spotbugsMain {
-    reports {
-        html {
-            enabled = true
-            stylesheet = 'fancy-hist.xsl'
-        }
-    }
-}
-spotbugsTest {
-    reports {
-        html {
-            enabled = true
-            stylesheet = 'fancy-hist.xsl'
-        }
-    }
-}
-spotbugsIntegrationTest {
-    reports {
-        html {
-            enabled = true
-            stylesheet = 'fancy-hist.xsl'
-        }
-    }
-}
-
 // Configuration for git properties gradle plugin
 // https://github.com/n0mer/gradle-git-properties
 gitProperties {


Mime
View raw message