Problem : Project linting task (Spotless-check) is too nitpicky and will not allow project to build
Goal : Trying disable the the spotless task when invoking ./gradelw assemble
(https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/gradlew)
Things I've tried
- Manually editing the internal Gradle files
- Adding the
-x
flag to Gradle : ie../gradlew assemble -x spotlessCheck
Result of attempts : The code linting task runs regardless of everything I've tried to disable it.
I've had this spotless issue with many Java projects, so I think it's not specific to otel. I think this feature needs to be added to spotless itself, so I'd open an issue there.
I usually just do
./gradlew spotlessApply
before running tests as a workaround.