Skip to content

Commit ecece44

Browse files
authored
Merge branch 'main' into scalafmt-compile-time-only-sourceset
2 parents 137392f + f617d0e commit ecece44

File tree

6 files changed

+10
-2
lines changed

6 files changed

+10
-2
lines changed

CHANGES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ This document is intended for Spotless developers.
1010
We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (starting after version `1.27.0`).
1111

1212
## [Unreleased]
13+
### Changes
1314
* Converted `scalafmt` integration to use a compile-only source set. (fixes [#524](https://github.com/diffplug/spotless/issues/524))
15+
* Add the `ktlint` rule in error messages when `ktlint` fails to apply a fix ([#1279](https://github.com/diffplug/spotless/pull/1279))
1416

1517
## [2.28.1] - 2022-08-10
1618
### Fixed

lib/src/ktlint/java/com/diffplug/spotless/glue/ktlint/KtlintFormatterFunc.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ static class FormatterCallback implements Function2<LintError, Boolean, Unit> {
111111
@Override
112112
public Unit invoke(LintError lint, Boolean corrected) {
113113
if (!corrected) {
114-
throw new AssertionError("Error on line: " + lint.getLine() + ", column: " + lint.getCol() + "\n" + lint.getDetail());
114+
throw new AssertionError("Error on line: " + lint.getLine() + ", column: " + lint.getCol() + "\nrule: " + lint.getRuleId() + "\n" + lint.getDetail());
115115
}
116116
return null;
117117
}

plugin-gradle/CHANGES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (starting after version `3.27.0`).
44

55
## [Unreleased]
6+
### Changes
7+
* Add the `ktlint` rule in error messages when `ktlint` fails to apply a fix ([#1279](https://github.com/diffplug/spotless/pull/1279))
68

79
## [6.9.1] - 2022-08-10
810
### Fixed

plugin-maven/CHANGES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (starting after version `1.27.0`).
44

55
## [Unreleased]
6+
### Changes
7+
* Add the `ktlint` rule in error messages when `ktlint` fails to apply a fix ([#1279](https://github.com/diffplug/spotless/pull/1279))
68

79
## [2.24.1] - 2022-08-10
810
### Fixed

settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ pluginManagement {
66
// https://github.com/gradle-nexus/publish-plugin/releases
77
id 'io.github.gradle-nexus.publish-plugin' version '1.1.0'
88
// https://github.com/spotbugs/spotbugs-gradle-plugin/releases
9-
id 'com.github.spotbugs' version '5.0.9'
9+
id 'com.github.spotbugs' version '5.0.10'
1010
// https://github.com/diffplug/spotless-changelog
1111
id 'com.diffplug.spotless-changelog' version '2.3.2'
1212
// https://github.com/diffplug/goomph/blob/main/CHANGES.md

testlib/src/test/java/com/diffplug/spotless/kotlin/KtLintStepTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ void behavior() throws Exception {
3232
.testResourceException("kotlin/ktlint/unsolvable.dirty", assertion -> {
3333
assertion.isInstanceOf(AssertionError.class);
3434
assertion.hasMessage("Error on line: 1, column: 1\n" +
35+
"rule: no-wildcard-imports\n" +
3536
"Wildcard import");
3637
});
3738
}
@@ -44,6 +45,7 @@ void worksPre0_46_1() throws Exception {
4445
.testResourceException("kotlin/ktlint/unsolvable.dirty", assertion -> {
4546
assertion.isInstanceOf(AssertionError.class);
4647
assertion.hasMessage("Error on line: 1, column: 1\n" +
48+
"rule: no-wildcard-imports\n" +
4749
"Wildcard import");
4850
});
4951
}

0 commit comments

Comments
 (0)