Skip to content

Commit

Permalink
Add quick build option to disable checkstyle and error-prone (apache#685
Browse files Browse the repository at this point in the history
)
  • Loading branch information
rdblue authored and aokolnychyi committed Dec 5, 2019
1 parent d70a631 commit 6233d7a
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 19 deletions.
40 changes: 22 additions & 18 deletions baseline.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ subprojects {
// Thus we concede to applying all of the Baseline plugins individually on all the projects we are
// ready to enforce linting on.
apply plugin: 'org.inferred.processors'
apply plugin: 'com.palantir.baseline-checkstyle'
apply plugin: 'com.palantir.baseline-error-prone'
if (!project.hasProperty('quick')) {
apply plugin: 'com.palantir.baseline-checkstyle'
apply plugin: 'com.palantir.baseline-error-prone'
}
apply plugin: 'com.palantir.baseline-scalastyle'
apply plugin: 'com.palantir.baseline-class-uniqueness'
apply plugin: 'com.palantir.baseline-reproducibility'
Expand All @@ -58,21 +60,23 @@ subprojects {
}
}

tasks.withType(JavaCompile).configureEach {
options.errorprone.errorproneArgs += [
// error-prone is slow, don't run on tests
'-XepExcludedPaths:.*/test/.*',
// specific to Palantir
'-Xep:PreferSafeLoggingPreconditions:OFF',
'-Xep:PreferSafeLoggableExceptions:OFF',
'-Xep:Slf4jLogsafeArgs:OFF',
// subclasses are not equal
'-Xep:EqualsGetClass:OFF',
// patterns that are allowed
'-Xep:SwitchStatementDefaultCase:OFF',
'-Xep:MissingCasesInEnumSwitch:OFF',
'-Xep:TypeParameterShadowing:OFF',
'-Xep:TypeParameterUnusedInFormals:OFF',
]
pluginManager.withPlugin('com.palantir.baseline-error-prone') {
tasks.withType(JavaCompile).configureEach {
options.errorprone.errorproneArgs += [
// error-prone is slow, don't run on tests
'-XepExcludedPaths:.*/test/.*',
// specific to Palantir
'-Xep:PreferSafeLoggingPreconditions:OFF',
'-Xep:PreferSafeLoggableExceptions:OFF',
'-Xep:Slf4jLogsafeArgs:OFF',
// subclasses are not equal
'-Xep:EqualsGetClass:OFF',
// patterns that are allowed
'-Xep:SwitchStatementDefaultCase:OFF',
'-Xep:MissingCasesInEnumSwitch:OFF',
'-Xep:TypeParameterShadowing:OFF',
'-Xep:TypeParameterUnusedInFormals:OFF',
]
}
}
}
4 changes: 3 additions & 1 deletion jmh.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ configure(jmhProjects) {
}

jmhCompileGeneratedClasses {
options.errorprone.enabled = false
pluginManager.withPlugin('com.palantir.baseline-error-prone') {
options.errorprone.enabled = false
}
}
}

0 comments on commit 6233d7a

Please sign in to comment.