Faster spotless (#844)

This commit is contained in:
Trask Stalnaker 2020-07-31 12:30:21 -07:00 committed by GitHub
parent 2af43dbf26
commit 48da19b8a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -80,8 +80,7 @@ spotless {
// this formatting is applied at the root level, as some of these files are not in a submodules
// and would be missed otherwise
format 'misc', {
target '**/.gitignore', '**/*.md', '**/*.sh'
targetExclude 'smoke-tests/**/build/**'
target '.gitignore', '*.md', 'docs/**/*.md'
indentWithSpaces()
trimTrailingWhitespace()
endWithNewline()

View File

@ -19,6 +19,13 @@ spotless {
ktlint().userData(['indent_size': '2', 'continuation_indent_size': '2'])
licenseHeaderFile rootProject.file('gradle/enforcement/spotless.license.java'), '(package|import|public)'
}
format 'misc', {
// not using '**/...' to help keep spotless fast
target '.gitignore', '*.md', 'src/**/.md', '*.sh'
indentWithSpaces()
trimTrailingWhitespace()
endWithNewline()
}
}
task formatCode(dependsOn: ['spotlessApply'])