From 6c20790c626b05045dc8e53afce004cbac9b8d9c Mon Sep 17 00:00:00 2001 From: Michael Ernst Date: Sun, 15 Jan 2023 16:21:38 -0800 Subject: [PATCH 1/6] Format more type annotations as type annotations --- CHANGES.md | 2 ++ .../com/diffplug/spotless/java/FormatAnnotationsStep.java | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index c08ca86796..b871fc4be8 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -22,6 +22,8 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format ( ### Fixed * Support `ktlint` 0.48+ new rule disabling syntax ([#1456](https://github.com/diffplug/spotless/pull/1456)) fixes ([#1444](https://github.com/diffplug/spotless/issues/1444)) * Fix subgroups leading catch all matcher. +* Format more type annotations as type annotations [#????](https://github.com/diffplug/spotless/pull/????) + ### Changes * Bump default version for `prettier` from `2.0.5` to `2.8.1` ([#1453](https://github.com/diffplug/spotless/pull/1453)) * Bump the dev version of Gradle from `7.5.1` to `7.6` ([#1409](https://github.com/diffplug/spotless/pull/1409)) diff --git a/lib/src/main/java/com/diffplug/spotless/java/FormatAnnotationsStep.java b/lib/src/main/java/com/diffplug/spotless/java/FormatAnnotationsStep.java index d05a53ee1b..f37502d145 100644 --- a/lib/src/main/java/com/diffplug/spotless/java/FormatAnnotationsStep.java +++ b/lib/src/main/java/com/diffplug/spotless/java/FormatAnnotationsStep.java @@ -55,6 +55,13 @@ public final class FormatAnnotationsStep { "Acceleration", "ACCTop", "AinferBottom", + "AinferDefaultType", + "AinferParent", + "AinferSibling1", + "AinferSibling2", + "AinferTop", + "AinferImplicitAnno", + "AinferSiblingWithFields", "AlwaysSafe", "Angle", "AnnoWithStringArg", @@ -102,6 +109,7 @@ public final class FormatAnnotationsStep { "DefaultType", "degrees", "Det", + "DoesNotMatchRegex", "DotSeparatedIdentifiers", "DotSeparatedIdentifiersOrPrimitiveType", "DoubleVal", From b4c0f1b8abf725ad5adc3dcd6f377613b901d0d4 Mon Sep 17 00:00:00 2001 From: Michael Ernst Date: Sun, 15 Jan 2023 16:24:54 -0800 Subject: [PATCH 2/6] Update `CHANGES.md` files --- CHANGES.md | 3 +-- plugin-gradle/CHANGES.md | 1 + plugin-maven/CHANGES.md | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index b871fc4be8..2f8ecc46f5 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -22,8 +22,7 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format ( ### Fixed * Support `ktlint` 0.48+ new rule disabling syntax ([#1456](https://github.com/diffplug/spotless/pull/1456)) fixes ([#1444](https://github.com/diffplug/spotless/issues/1444)) * Fix subgroups leading catch all matcher. -* Format more type annotations as type annotations [#????](https://github.com/diffplug/spotless/pull/????) - +* Format more type annotations as type annotations [#1494](https://github.com/diffplug/spotless/pull/1494) ### Changes * Bump default version for `prettier` from `2.0.5` to `2.8.1` ([#1453](https://github.com/diffplug/spotless/pull/1453)) * Bump the dev version of Gradle from `7.5.1` to `7.6` ([#1409](https://github.com/diffplug/spotless/pull/1409)) diff --git a/plugin-gradle/CHANGES.md b/plugin-gradle/CHANGES.md index f6210ce8de..ef2b7a74c3 100644 --- a/plugin-gradle/CHANGES.md +++ b/plugin-gradle/CHANGES.md @@ -13,6 +13,7 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format ( * Prevent tool configurations from being resolved outside project ([#1447](https://github.com/diffplug/spotless/pull/1447) fixes [#1215](https://github.com/diffplug/spotless/issues/1215)) * Support `ktlint` 0.48+ new rule disabling syntax ([#1456](https://github.com/diffplug/spotless/pull/1456)) fixes ([#1444](https://github.com/diffplug/spotless/issues/1444)) * Fix subgroups leading catch all matcher. +* Format more type annotations as type annotations [#1494](https://github.com/diffplug/spotless/pull/1494) ### Changes * Bump default `ktlint` version to latest `0.47.1` -> `0.48.1` ([#1456](https://github.com/diffplug/spotless/pull/1456)) * Bump default version for `prettier` from `2.0.5` to `2.8.1` ([#1453](https://github.com/diffplug/spotless/pull/1453)) diff --git a/plugin-maven/CHANGES.md b/plugin-maven/CHANGES.md index 6f59030a8e..71d44df464 100644 --- a/plugin-maven/CHANGES.md +++ b/plugin-maven/CHANGES.md @@ -14,6 +14,7 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format ( ### Fixed * Support `ktlint` 0.48+ new rule disabling syntax ([#1456](https://github.com/diffplug/spotless/pull/1456)) fixes ([#1444](https://github.com/diffplug/spotless/issues/1444)) * Fix subgroups leading catch all matcher. +* Format more type annotations as type annotations [#1494](https://github.com/diffplug/spotless/pull/1494) ### Changes * Bump default `ktlint` version to latest `0.47.1` -> `0.48.1` ([#1456](https://github.com/diffplug/spotless/pull/1456)) * Reduce spurious invalidations of the up-to-date index file ([#1461](https://github.com/diffplug/spotless/pull/1461)) From 48245dfa47abf5ce4d87189a5eb8883ec7f3d698 Mon Sep 17 00:00:00 2001 From: Michael Ernst Date: Sun, 15 Jan 2023 16:27:02 -0800 Subject: [PATCH 3/6] Update copyright date --- .../java/com/diffplug/spotless/java/FormatAnnotationsStep.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/main/java/com/diffplug/spotless/java/FormatAnnotationsStep.java b/lib/src/main/java/com/diffplug/spotless/java/FormatAnnotationsStep.java index f37502d145..5a2d856850 100644 --- a/lib/src/main/java/com/diffplug/spotless/java/FormatAnnotationsStep.java +++ b/lib/src/main/java/com/diffplug/spotless/java/FormatAnnotationsStep.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 DiffPlug + * Copyright 2022-2023 DiffPlug * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. From 70f38248ba47310e58e58970e0885d437e77c775 Mon Sep 17 00:00:00 2001 From: Michael Ernst Date: Sun, 15 Jan 2023 16:34:20 -0800 Subject: [PATCH 4/6] Move changelog entry --- CHANGES.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 2f8ecc46f5..9c0ed23980 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -10,6 +10,10 @@ This document is intended for Spotless developers. We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (starting after version `1.27.0`). ## [Unreleased] +### Added +### Fixed +* Format more type annotations as type annotations [#1494](https://github.com/diffplug/spotless/pull/1494) +### Changes ## [2.32.0] - 2023-01-13 ### Added @@ -22,7 +26,6 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format ( ### Fixed * Support `ktlint` 0.48+ new rule disabling syntax ([#1456](https://github.com/diffplug/spotless/pull/1456)) fixes ([#1444](https://github.com/diffplug/spotless/issues/1444)) * Fix subgroups leading catch all matcher. -* Format more type annotations as type annotations [#1494](https://github.com/diffplug/spotless/pull/1494) ### Changes * Bump default version for `prettier` from `2.0.5` to `2.8.1` ([#1453](https://github.com/diffplug/spotless/pull/1453)) * Bump the dev version of Gradle from `7.5.1` to `7.6` ([#1409](https://github.com/diffplug/spotless/pull/1409)) From b42a1453b385b4320072eaf654da1b6cc4d2297d Mon Sep 17 00:00:00 2001 From: Michael Ernst Date: Tue, 17 Jan 2023 12:54:28 -0800 Subject: [PATCH 5/6] Make changelog entries more informative --- CHANGES.md | 2 +- plugin-gradle/CHANGES.md | 2 +- plugin-maven/CHANGES.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 9c0ed23980..3e648d9e0c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -12,7 +12,7 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format ( ## [Unreleased] ### Added ### Fixed -* Format more type annotations as type annotations [#1494](https://github.com/diffplug/spotless/pull/1494) +* The default list of type annotations used by `formatAnnotations` has had 8 more annotations from the Checker Framework added [#1494](https://github.com/diffplug/spotless/pull/1494) ### Changes ## [2.32.0] - 2023-01-13 diff --git a/plugin-gradle/CHANGES.md b/plugin-gradle/CHANGES.md index d3ee07acad..0ed49a3408 100644 --- a/plugin-gradle/CHANGES.md +++ b/plugin-gradle/CHANGES.md @@ -15,7 +15,7 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format ( * Prevent tool configurations from being resolved outside project ([#1447](https://github.com/diffplug/spotless/pull/1447) fixes [#1215](https://github.com/diffplug/spotless/issues/1215)) * Support `ktlint` 0.48+ new rule disabling syntax ([#1456](https://github.com/diffplug/spotless/pull/1456)) fixes ([#1444](https://github.com/diffplug/spotless/issues/1444)) * Fix subgroups leading catch all matcher. -* Format more type annotations as type annotations [#1494](https://github.com/diffplug/spotless/pull/1494) +* The default list of type annotations used by `formatAnnotations` has had 8 more annotations from the Checker Framework added [#1494](https://github.com/diffplug/spotless/pull/1494) ### Changes * Bump default `ktlint` version to latest `0.47.1` -> `0.48.1` ([#1456](https://github.com/diffplug/spotless/pull/1456)) * Bump default version for `prettier` from `2.0.5` to `2.8.1` ([#1453](https://github.com/diffplug/spotless/pull/1453)) diff --git a/plugin-maven/CHANGES.md b/plugin-maven/CHANGES.md index d7d40f65c7..d0942d2ca8 100644 --- a/plugin-maven/CHANGES.md +++ b/plugin-maven/CHANGES.md @@ -16,7 +16,7 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format ( ### Fixed * Support `ktlint` 0.48+ new rule disabling syntax ([#1456](https://github.com/diffplug/spotless/pull/1456)) fixes ([#1444](https://github.com/diffplug/spotless/issues/1444)) * Fix subgroups leading catch all matcher. -* Format more type annotations as type annotations [#1494](https://github.com/diffplug/spotless/pull/1494) +* The default list of type annotations used by `formatAnnotations` has had 8 more annotations from the Checker Framework added [#1494](https://github.com/diffplug/spotless/pull/1494) ### Changes * Bump default `ktlint` version to latest `0.47.1` -> `0.48.1` ([#1456](https://github.com/diffplug/spotless/pull/1456)) * Reduce spurious invalidations of the up-to-date index file ([#1461](https://github.com/diffplug/spotless/pull/1461)) From 4ff0c33c8055fb661680724db0ddba265d0de6eb Mon Sep 17 00:00:00 2001 From: Michael Ernst Date: Tue, 17 Jan 2023 12:57:39 -0800 Subject: [PATCH 6/6] Put changelog entries in "unreleased" section --- plugin-gradle/CHANGES.md | 5 ++++- plugin-maven/CHANGES.md | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/plugin-gradle/CHANGES.md b/plugin-gradle/CHANGES.md index 0ed49a3408..63e5b43d74 100644 --- a/plugin-gradle/CHANGES.md +++ b/plugin-gradle/CHANGES.md @@ -3,6 +3,10 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (starting after version `3.27.0`). ## [Unreleased] +### Added +### Fixed +* The default list of type annotations used by `formatAnnotations` has had 8 more annotations from the Checker Framework added [#1494](https://github.com/diffplug/spotless/pull/1494) +### Changes ## [6.13.0] - 2023-01-14 ### Added @@ -15,7 +19,6 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format ( * Prevent tool configurations from being resolved outside project ([#1447](https://github.com/diffplug/spotless/pull/1447) fixes [#1215](https://github.com/diffplug/spotless/issues/1215)) * Support `ktlint` 0.48+ new rule disabling syntax ([#1456](https://github.com/diffplug/spotless/pull/1456)) fixes ([#1444](https://github.com/diffplug/spotless/issues/1444)) * Fix subgroups leading catch all matcher. -* The default list of type annotations used by `formatAnnotations` has had 8 more annotations from the Checker Framework added [#1494](https://github.com/diffplug/spotless/pull/1494) ### Changes * Bump default `ktlint` version to latest `0.47.1` -> `0.48.1` ([#1456](https://github.com/diffplug/spotless/pull/1456)) * Bump default version for `prettier` from `2.0.5` to `2.8.1` ([#1453](https://github.com/diffplug/spotless/pull/1453)) diff --git a/plugin-maven/CHANGES.md b/plugin-maven/CHANGES.md index d0942d2ca8..e951241a09 100644 --- a/plugin-maven/CHANGES.md +++ b/plugin-maven/CHANGES.md @@ -3,6 +3,10 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (starting after version `1.27.0`). ## [Unreleased] +### Added +### Fixed +* The default list of type annotations used by `formatAnnotations` has had 8 more annotations from the Checker Framework added [#1494](https://github.com/diffplug/spotless/pull/1494) +### Changes ## [2.30.0] - 2023-01-13 ### Added @@ -16,7 +20,6 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format ( ### Fixed * Support `ktlint` 0.48+ new rule disabling syntax ([#1456](https://github.com/diffplug/spotless/pull/1456)) fixes ([#1444](https://github.com/diffplug/spotless/issues/1444)) * Fix subgroups leading catch all matcher. -* The default list of type annotations used by `formatAnnotations` has had 8 more annotations from the Checker Framework added [#1494](https://github.com/diffplug/spotless/pull/1494) ### Changes * Bump default `ktlint` version to latest `0.47.1` -> `0.48.1` ([#1456](https://github.com/diffplug/spotless/pull/1456)) * Reduce spurious invalidations of the up-to-date index file ([#1461](https://github.com/diffplug/spotless/pull/1461))