Skip to content

Commit

Permalink
Add a system property to forcibly format everything (#78768)
Browse files Browse the repository at this point in the history
In order to make it easier to migrate to an automatically-formatted world,
add a system property that causes Spotless to format every Java project,
ignoring the exclusion list.
  • Loading branch information
pugnascotia committed Oct 6, 2021
1 parent 615ffa0 commit 8579394
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,8 @@ def projectPathsToExclude = [

subprojects {
plugins.withType(ElasticsearchJavaPlugin).whenPluginAdded {
if (projectPathsToExclude.contains(project.path) == false) {
if (projectPathsToExclude.contains(project.path) == false ||
providers.systemProperty("es.format.everything").forUseAtConfigurationTime().isPresent()) {
project.apply plugin: "com.diffplug.spotless"

spotless {
Expand Down

0 comments on commit 8579394

Please sign in to comment.