Skip to content

Commit

Permalink
Enable linting and treat warnings as errors
Browse files Browse the repository at this point in the history
  • Loading branch information
wilkinsona committed May 2, 2024
1 parent 7a56eaa commit 6cc618e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ java {
withSourcesJar()
}

tasks.withType(JavaCompile).configureEach {
options.compilerArgs.addAll "-Werror", "-Xlint:unchecked", "-Xlint:deprecation", "-Xlint:rawtypes", "-Xlint:varargs"
}

tasks.named("test").configure {
useJUnitPlatform()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import io.spring.gradle.dependencymanagement.org.apache.maven.model.Parent;
import io.spring.gradle.dependencymanagement.org.apache.maven.model.Repository;
import io.spring.gradle.dependencymanagement.org.apache.maven.model.building.FileModelSource;
import io.spring.gradle.dependencymanagement.org.apache.maven.model.building.ModelSource;
import io.spring.gradle.dependencymanagement.org.apache.maven.model.resolution.InvalidRepositoryException;
import io.spring.gradle.dependencymanagement.org.apache.maven.model.resolution.ModelResolver;
import io.spring.gradle.dependencymanagement.org.apache.maven.model.resolution.UnresolvableModelException;
Expand All @@ -34,7 +33,8 @@

/**
* A {@link ModelResolver} that uses a {@link Configuration} to resolve the
* {@link ModelSource} for a pom. requested model.
* {@link io.spring.gradle.dependencymanagement.org.apache.maven.model.building.ModelSource}
* for a pom. requested model.
*
* @author Andy Wilkinson
*/
Expand Down

0 comments on commit 6cc618e

Please sign in to comment.