Description
There are a number of build.gradle
files that specifically disable -Xlint warnings for both production and test code. This should be avoided, because that can mask real bugs.
The following build.gradle
files should be checked:
-
./benchmarks/build.gradle
-
./client/client-benchmark-noop-api-plugin/build.gradle
-
./modules/ingest-common/build.gradle
Remove -Xlint exclusions in the ingest-common module. #40505 -
./modules/ingest-geoip/build.gradle
Remove -Xlint exclusions in the ingest-geoip module #40629 -
./modules/percolator/build.gradle
Remove -Xlint exclusions in the percolator module. #40372 -
./modules/transport-netty4/build.gradle
-
./plugins/ingest-attachment/build.gradle
Remove -Xlint exclusions in all plugins. #40721 -
./plugins/mapper-size/build.gradle
Remove -Xlint exclusions in all plugins. #40721 -
./plugins/transport-nio/build.gradle
Remove -Xlint exclusions in all plugins. #40721 -
./server/build.gradle
-
./test/framework/build.gradle
Re-enable compiler warnings in :test:framework #75449 -
./x-pack/plugin/ccr/build.gradle
Make -try xlint warning disabled by default. #40833 -
./x-pack/plugin/core/build.gradle
Enable compiler warnings in xpack core plugin project #66899 -
./x-pack/plugin/data-frame/build.gradle
[ML] Data Frame minor tidy ups #40548 -
./x-pack/plugin/ml/build.gradle
Enable XLint warnings for ML #44285 -
./x-pack/plugin/monitoring/build.gradle
-
./x-pack/plugin/rollup/build.gradle
-
./x-pack/plugin/security/build.gradle
Enable compiler warnings in x-pack security #75473 -
./x-pack/plugin/watcher/build.gradle
Enable compiler warnings for watcher #75516 -
./x-pack/qa/rolling-upgrade-basic/build.gradle
-
./x-pack/qa/rolling-upgrade/build.gradle
-
./x-pack/qa/third-party/active-directory/build.gradle
- (I may be missing a few files)
If possible both compileJava.options.compilerArgs
and compileTestJava.options.compilerArgs
should be removed. Removing compileTestJava.options.compilerArgs
can be difficult, for example because of many tests having raw types or unchecked checks. So at least we should try to remove compileJava.options.compilerArgs
in each of the above mentioned files.
By default the build disables the following warning: -path
, -serial
, -options
, -deprecation
. So if one of those warnings are also mentioned in a build.gradle
file then that can be removed.
If you like to fix one of the above gradle files then post a comment which file you like to fix.