Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions gradle/special-tests.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ def special = [
boolean isCiServer = System.getenv().containsKey("CI")
tasks.withType(Test).configureEach {
if (isCiServer) {
retry {
maxRetries = 2
maxFailures = 10
develocity {
testRetry {
maxRetries = 2
maxFailures = 10
}
}
}
// selfie https://selfie.dev/jvm/get-started#gradle
Expand Down
1 change: 1 addition & 0 deletions plugin-gradle/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
* Bump default `google-java-format` version to latest `1.24.0` -> `1.28.0`. ([#2345](https://github.com/diffplug/spotless/pull/2345))
* Bump default `ktlint` version to latest `1.5.0` -> `1.7.1`. ([#2555](https://github.com/diffplug/spotless/pull/2555))
* Bump default `jackson` version to latest `2.19.2` -> `2.20.0`. ([#2606](https://github.com/diffplug/spotless/pull/2606))
* Running `spotlessCheck` with violations unilaterally produces the error message `Run './gradlew spotlessApply' to fix these violations`. ([#2592](https://github.com/diffplug/spotless/issues/2592))
### Fixed
* Respect system gitconfig when performing git operations ([#2404](https://github.com/diffplug/spotless/issues/2404))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,7 @@ void init(SpotlessTaskImpl impl) {
getProjectPath().set(getProject().getPath());
getEncoding().set(impl.getEncoding());
getRunToFixMessage().convention(
"Run '" + calculateGradleCommand() + " " + getTaskPathPrefix() + "spotlessApply' to fix these violations.");
}

private String getTaskPathPrefix() {
String path = getProjectPath().get();
return path.equals(":") ? ":" : path + ":";
"Run '" + calculateGradleCommand() + " spotlessApply' to fix all violations.");
}

private static String calculateGradleCommand() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016-2024 DiffPlug
* Copyright 2016-2025 DiffPlug
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -117,8 +117,8 @@ private void assertCheckFailure(Bundle spotless, String... expectedLines) throws
}

static final String EXPECTED_RUN_SPOTLESS_APPLY_SUGGESTION = FileSignature.machineIsWin()
? "Run 'gradlew.bat :spotlessApply' to fix these violations."
: "Run './gradlew :spotlessApply' to fix these violations.";
? "Run 'gradlew.bat spotlessApply' to fix all violations."
: "Run './gradlew spotlessApply' to fix all violations.";

@Test
void lineEndingProblem() throws Exception {
Expand Down
Loading