You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+27Lines changed: 27 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,32 @@
2
2
All notable changes to this project will be documented in this file.
3
3
This project adheres to [Semantic Versioning](https://semver.org/).
4
4
5
+
## [1.6.0] - 2025-05-19
6
+
7
+
### 🆕 Features
8
+
9
+
10
+
* Add configuration option to handle (certain) annotation with parameters identical to annotations without parameters - [#2950](https://github.com/pinterest/ktlint/pull/2950), by @paul-dingemans
11
+
12
+
* Set system properties to prevent failure when running in ktlint-intellij-plugin with custom installation - [#2970](https://github.com/pinterest/ktlint/pull/2970), by @paul-dingemans
13
+
14
+
* chore(deps): update dependency gradle to v8.14 - [#2971](https://github.com/pinterest/ktlint/pull/2971), by @renovate[bot]
15
+
16
+
* chore(deps): update plugin com.gradle.develocity to v4.0.1 - [#2972](https://github.com/pinterest/ktlint/pull/2972), by @renovate[bot]
17
+
18
+
* fix(deps): update dependency org.jetbrains.kotlin:kotlin-gradle-plugin to v2.2.0-beta2 - [#2977](https://github.com/pinterest/ktlint/pull/2977), by @renovate[bot]
19
+
20
+
* fix(deps): update dependency org.ec4j.core:ec4j-core to v1.1.1 - [#2987](https://github.com/pinterest/ktlint/pull/2987), by @renovate[bot]
21
+
22
+
* fix(deps): update dependency dev.drewhamilton.poko:poko-gradle-plugin to v0.18.7 - [#2986](https://github.com/pinterest/ktlint/pull/2986), by @renovate[bot]
23
+
24
+
* fix(deps): update kotlin monorepo to 2.1.21 - [#2985](https://github.com/pinterest/ktlint/pull/2985), by @renovate[bot]
25
+
26
+
### 💬 Other
27
+
28
+
29
+
* ignore `.kotlin` directory - [#2916](https://github.com/pinterest/ktlint/pull/2916), by @mgroth0
30
+
5
31
## [1.5.0] - 2024-12-04
6
32
7
33
The release of Kotlin 2.1 is the primary reason for publishing this release earlier than planned. Because of the removal of some language elements in Kotlin 2.1, the embedded Kotlin compiler in KtLint blocked Kotlinter users from upgrading to Kotlin 2.1.
@@ -2645,6 +2671,7 @@ set in `[*{kt,kts}]` section).
Copy file name to clipboardExpand all lines: RELEASE_TESTING.MD
+22-23Lines changed: 22 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -99,40 +99,39 @@ Formatting projects in which ktlint is not used may result in a huge amount of f
99
99
```shell
100
100
./exec-in-each-project.sh "git add --all && git commit -m \"Update .editorconfig to fallback to integration test settings\""
101
101
```
102
-
3.Build baseline file with previous (*latest released*) version of Lint (when building with format the offsets of the error are not saved correctly in the baseline)
102
+
3.Format with previous (*latest released*) version of Lint
103
103
```shell
104
-
rm baseline.xml
105
-
ktlint-prev --baseline=baseline.xml --relative # Do not call this command via the "./exec-in-each-project.sh" script.
106
-
```
107
-
Note: Ignore all output as this is the old version!
108
-
4. Format the sample projects with the previous (*latest released*) ktlint version:
109
-
```shell
110
-
ktlint-prev -F --baseline=baseline.xml --relative # Do not call this command via the "./exec-in-each-project.sh" script.
104
+
ktlint-prev --format --relative # Do not call this command via the "./exec-in-each-project.sh" script.
111
105
```
112
106
Note: Ignore all output as this is the old version!
113
-
5. Commit changes:
107
+
4. Commit changes:
114
108
```shell
115
109
./exec-in-each-project.sh "git add --all && git commit -m \"Format with previous ktlint version (round #)\""
116
110
```
117
111
Repeat step 4 and 5 until no files are changed anymore. Although ktlint reruns up to 3 times in case new violations are introduced, it can still happen that not all violations have been fixed with a single invocation.
118
-
6. Check that besides the `baseline.xml` no files are changed (in step 4 and 5 all violations which could be autocorrected have already been committed). Remaining violations which could not be autocorrected are saved in the `baseline.xml` which is stored outside the project directories.
119
-
```shell
120
-
./exec-in-each-project.sh "git status"
121
-
```
122
-
7. Rebuild baseline file with previous (*latest released*) ktlint (when building with format the offsets of the error are not saved correctly in the baseline) so that all violations are now stored in the baseline. Note the old `baseline.xml` still contains all errors which are already autocorrected. After running next command, only the error which can not be autocorrected with the previous ktlint version remain.
112
+
5. Build baseline file with previous (*latest released*) version of Lint (when building with format the offsets of the error are not saved correctly in the baseline) so that all errors which cannot be autocorrected are ignored.
123
113
```shell
124
114
rm baseline.xml
125
115
ktlint-prev --baseline=baseline.xml --relative # Do not call this command via the "./exec-in-each-project.sh" script.
126
116
```
127
-
Note: Ignore all output as this is the old version!
117
+
Note: Ignore all output as this is the old version! Inspect the baseline roughly to verify that it only contains errors that cannot be autocorrected.
118
+
6. Format the sample projects with the previous (*latest released*) ktlint version:
119
+
```shell
120
+
ktlint-prev -F --baseline=baseline.xml --relative # Do not call this command via the "./exec-in-each-project.sh" script.
121
+
```
122
+
Note: The output should not report any violations, as the baseline should suppress every error that could not autocorrected.
123
+
7. Check that besides the `baseline.xml` no files are changed (in step 4 and 5 all violations which could be autocorrected have already been committed). Remaining violations which could not be autocorrected are saved in the `baseline.xml` which is stored outside the project directories.
124
+
```shell
125
+
./exec-in-each-project.sh "git status"
126
+
```
128
127
8. Lint with *latest development* version:
129
128
```shell
130
129
ktlint-dev --baseline=baseline.xml --relative # Do not call this command via the "./exec-in-each-project.sh" script as we want to use the one combined baseline.xml file for all projects.
131
130
```
132
131
Inspect the output roughly (detailed inspection is done when formatting):
133
-
* Is the amount of logging messages comparable to before? If not, are the changes intended?
134
-
* Are violations related to rules that have actually been added or changed?
135
-
* If you see an error like below, then this version obviously may *not* be released. It is best to fix this error before continuing with testing and validating!
132
+
* Is the amount of logging messages comparable to before? If not, are the changes intended?
133
+
* Are violations related to rules that have actually been added or changed?
134
+
* If you see an error like below, then this version obviously may *not* be released. It is best to fix this error before continuing with testing and validating!
136
135
```plain
137
136
Internal Error (...) in file '...' at position '0:0. Please create a ticket at https://github.com/pinterest/ktlint/issues ...
138
137
```
@@ -141,14 +140,14 @@ Formatting projects in which ktlint is not used may result in a huge amount of f
141
140
ktlint-dev -F --baseline=baseline.xml --relative # Do not call this command via the "./exec-in-each-project.sh" script as we want to use the one combined baseline.xml file for all projects.
142
141
```
143
142
Inspect the output carefully:
144
-
* If you see an error like below, then this version obviously may *not* be released. It is best to fix this error before continuing with testing and validating!
143
+
* If you see an error like below, then this version obviously may *not* be released. It is best to fix this error before continuing with testing and validating!
145
144
```plain
146
145
Internal Error (...) in file '...' at position '0:0. Please create a ticket at https://github.com/pinterest/ktlint/issues ...
147
146
```
148
-
* Usually it helps to disable all rules that emit violations, except one of those rules. In this way it is possible to evaluate the changes rule by rule.
149
-
* Ideally, no violations are shown. This means that all violations have been autocorrected. Note that violations might pop up that previously were suppressed via the baseline. This can happen as due to code changes, the references in the baseline.xml no longer match with the positions where they occur. First check the code changes, and regenerating the baseline before verifying the next can be a helpful approach.
150
-
* Violations which could not be autocorrected should be validated for correctness but do not block the release as most likely this is intended behavior.
151
-
* If a violation is shown which is not marked as being "can not be autocorrected" this means that during autocorrect of another violation a new violations has been introduced. This should be fixed before releasing especially when the next format introduces the original violation again which of course would result in an endless loop.
147
+
* Usually it helps to disable all rules that emit violations, except one of those rules. In this way it is possible to evaluate the changes rule by rule.
148
+
* Ideally, no violations are shown. This means that all violations have been autocorrected. Note that violations might pop up that previously were suppressed via the baseline. This can happen as due to code changes, the references in the baseline.xml no longer match with the positions where they occur. First check the code changes, and regenerating the baseline before verifying the next can be a helpful approach.
149
+
* Violations which could not be autocorrected should be validated for correctness but do not block the release as most likely this is intended behavior.
150
+
* If a violation is shown which is not marked as being "can not be autocorrected" this means that during autocorrect of another violation a new violations has been introduced. This should be fixed before releasing especially when the next format introduces the original violation again which of course would result in an endless loop.
152
151
10. Inspect all fixed violations, Of course inspection similar violations tens of times does not make sense. At least check different types of violations a couple of times. Commit changes which do not need to be inspected again:
153
152
```shell
154
153
./exec-in-each-project.sh "git add --all && git commit -m \"Fixed with latest development version\""
Copy file name to clipboardExpand all lines: ktlint-ruleset-standard/src/main/kotlin/com/pinterest/ktlint/ruleset/standard/rules/TrailingCommaOnDeclarationSiteRule.kt
+1-8Lines changed: 1 addition & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -428,14 +428,7 @@ public class TrailingCommaOnDeclarationSiteRule :
0 commit comments