Limit spotless checks to java classes in expected java dirs (#1490)

Sometimes build generated classes (like JMH) get caught up in IntelliJ's build dirs and the formatter doesn't like that. Change the spotless filter to only examine files in their expected dirs.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
pull/2/head
Danno Ferrin 6 years ago committed by GitHub
parent b86cedfa11
commit 3ec2764925
  1. 4
      build.gradle

@ -105,7 +105,7 @@ allprojects {
java { java {
// This path needs to be relative to each project // This path needs to be relative to each project
target fileTree('.') { target fileTree('.') {
include '**/*.java' include '**/src/*/java/**/*.java'
exclude '**/generalstate/GeneralStateReferenceTest*.java' exclude '**/generalstate/GeneralStateReferenceTest*.java'
exclude '**/generalstate/GeneralStateRegressionReferenceTest*.java' exclude '**/generalstate/GeneralStateRegressionReferenceTest*.java'
exclude '**/blockchain/BlockchainReferenceTest*.java' exclude '**/blockchain/BlockchainReferenceTest*.java'
@ -128,7 +128,7 @@ allprojects {
// Below this line are currently only license header tasks // Below this line are currently only license header tasks
format 'groovy', { format 'groovy', {
target '**/*.groovy' target '**/src/*/grovy/**/*.groovy'
licenseHeaderFile "${rootDir}/gradle/spotless.java.license", 'import' licenseHeaderFile "${rootDir}/gradle/spotless.java.license", 'import'
} }

Loading…
Cancel
Save