mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-27 17:10:22 -04:00
Split build benchmark jobs for faster feedback (#84978)
Also handle gradle-profiler introduced spotless issue when running performance tests
This commit is contained in:
parent
bb858cf4b7
commit
f2a117095b
5 changed files with 118 additions and 62 deletions
|
@ -59,7 +59,6 @@ public class FormattingPrecommitPlugin implements Plugin<Project> {
|
|||
}
|
||||
|
||||
java.target("src/**/*.java");
|
||||
|
||||
java.removeUnusedImports();
|
||||
|
||||
// We enforce a standard order for imports
|
||||
|
@ -72,6 +71,13 @@ public class FormattingPrecommitPlugin implements Plugin<Project> {
|
|||
// order, apply this one last, otherwise non-empty blank lines can creep
|
||||
// in.
|
||||
java.trimTrailingWhitespace();
|
||||
|
||||
// When running build benchmarks we alter the source in some scenarios.
|
||||
// The gradle-profiler unfortunately does not generate compliant formatted
|
||||
// sources so we ignore that altered file when running build benchmarks
|
||||
if(Boolean.getBoolean("BUILD_PERFORMANCE_TEST") && project.getPath().equals(":server")) {
|
||||
java.ignoreErrorForPath("src/main/java/org/elasticsearch/bootstrap/BootstrapInfo.java");
|
||||
}
|
||||
});
|
||||
|
||||
project.getTasks().named("precommit").configure(precommitTask -> precommitTask.dependsOn("spotlessJavaCheck"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue