From bb8b43a3777080d774a461f12eb51b13ad3ad13c Mon Sep 17 00:00:00 2001 From: Andrey Pleskach Date: Thu, 14 Sep 2023 12:03:28 +0200 Subject: [PATCH] Enable warnings during compilation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Enabled all recommended warnings during compilation. Warnigs are: - rawtypes - warns about the use of raw types - unchecked - warns about unchecked operations - static – warns about the access to a static member from an instance member - cast – warns about unnecessary casts - serial – warns about serializable classes not having a serialversionUID - fallthrough – warns about the falling through in a switch statement --- build.gradle | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/build.gradle b/build.gradle index 1f3d9a189a..ca338c8c08 100644 --- a/build.gradle +++ b/build.gradle @@ -95,6 +95,18 @@ spotbugsTest { java.sourceCompatibility = JavaVersion.VERSION_11 java.targetCompatibility = JavaVersion.VERSION_11 + +compileJava { + options.compilerArgs = ["-Xlint:all"] + options.failOnError = false +} + +compileTestJava { + options.compilerArgs = ["-Xlint:all"] + options.failOnError = false +} + + licenseHeaders.enabled = true // The following check that have never be enabled in security