Commit Graph

82 Commits

Author SHA1 Message Date
Stephan Schroevers
2437c66793 Use text blocks 2024-12-26 15:24:50 +01:00
Stephan Schroevers
3cacd27248 [maven-release-plugin] prepare for next development iteration 2024-11-03 16:58:19 +01:00
Stephan Schroevers
f06a2e4d43 [maven-release-plugin] prepare release v0.19.1 2024-11-03 16:58:19 +01:00
Stephan Schroevers
eccfc34c78 [maven-release-plugin] prepare for next development iteration 2024-10-31 20:57:03 +01:00
Stephan Schroevers
0317cb73d6 [maven-release-plugin] prepare release v0.19.0 2024-10-31 20:57:03 +01:00
Picnic-DevPla-Bot
0bce1a0e29 Upgrade Mockito 5.13.0 -> 5.14.0 (#1345)
And configure its Java agent such that Byte Buddy does not need to use
the deprecated self-attach mechanism.

See:
- https://github.com/mockito/mockito/releases/tag/v5.14.0
- https://github.com/mockito/mockito/compare/v5.13.0...v5.14.0
2024-10-17 15:11:27 +02:00
Stephan Schroevers
c679a3fc0c Improve Optional#orElse{,Get} support (#1283)
Summary of changes:
- Consolidate the `OptionalOrElseGet` Refaster rule and the 
  `OptionalOrElse` bug checker into the latter, keeping the best of
  both.
- Rename the `OptionalOrElse` bug checker to `OptionalOrElseGet` to
  avoid confusion.
- Replace the `IsLikelyTrivialComputation` matcher with the inverse
  `RequiresComputation` variant.
- Introduce an `OptionalOrElse` Refaster rule that simplifies
  expressions in the "opposite direction".
2024-09-03 16:00:33 +02:00
Stephan Schroevers
fa8ca80040 [maven-release-plugin] prepare for next development iteration 2024-08-11 15:05:54 +02:00
Stephan Schroevers
b733179cd0 [maven-release-plugin] prepare release v0.18.0 2024-08-11 15:05:54 +02:00
Stephan Schroevers
290ddf1972 [maven-release-plugin] prepare for next development iteration 2024-07-20 14:15:44 +02:00
Stephan Schroevers
5a163ce2e9 [maven-release-plugin] prepare release v0.17.0 2024-07-20 14:15:43 +02:00
Stephan Schroevers
e3cda3ea49 [maven-release-plugin] prepare for next development iteration 2024-03-15 13:04:44 +01:00
Stephan Schroevers
8aec87b40e [maven-release-plugin] prepare release v0.16.1 2024-03-15 13:04:44 +01:00
Stephan Schroevers
23ceb4aa6b [maven-release-plugin] prepare for next development iteration 2024-03-12 08:24:08 +01:00
Stephan Schroevers
5cca9d23da [maven-release-plugin] prepare release v0.16.0 2024-03-12 08:24:08 +01:00
Stephan Schroevers
433b8b90c0 Require JDK 17 rather than JDK 11 (#603)
By raising this baseline the project can now use Java 17 language features such
as text blocks, switch expressions and `instanceof` pattern matching. The code
has been updated to make use of these constructs.

Note that the project can still be used by builds that target an older version
of Java, as long as those builds are executed using JDK 17+.
2024-02-11 16:57:13 +01:00
Stephan Schroevers
1f50772433 [maven-release-plugin] prepare for next development iteration 2024-02-11 14:31:59 +01:00
Stephan Schroevers
382b79989c [maven-release-plugin] prepare release v0.15.0 2024-02-11 14:31:59 +01:00
Stephan Schroevers
1cc792c615 Introduce ExhaustiveRefasterTypeMigration check (#770)
The new `@TypeMigration` annotation can be placed on Refaster rule
collections to indicate that they migrate most or all public methods of
an indicated type. The new check validates the claim made by the
annotation.
2024-02-11 12:42:39 +01:00
Stephan Schroevers
dc65917ef1 Avoid NPE in IsEmpty matcher (#978) 2024-01-20 12:34:50 +01:00
Stephan Schroevers
09317abb18 Fix the mutation test setup (#976)
This largely reverts commit dff67fecbc,
avoiding the issue described in pitest/pitest-junit5-plugin#105.
2024-01-14 19:04:57 +01:00
Stephan Schroevers
dff67fecbc Drop unnecessary dependency declarations (#973) 2024-01-13 20:53:00 +01:00
Stephan Schroevers
b8eabff9bc Run org.kordamp.maven:pomchecker-maven-plugin:1.10.0:check-maven-central (#491)
This new Maven goal validates that the `pom.xml` files meet the criteria
for being deployed to Maven Central.
2024-01-13 17:34:26 +01:00
Stephan Schroevers
0440df8911 Have ThrowsCheckedException also consider supertypes (#914)
This prevents the `MonoFromSupplier` Refaster rule from suggesting
noncompilable code.
2024-01-01 12:26:43 +01:00
Stephan Schroevers
626246bcc0 Introduce CanonicalClassNameUsage check (#881)
Error Prone checks deal with source code and type matchers, both of
which generally involve canonical type names, rather than the strings
produced by `Class#getName()`. This distinction is particularly relevant
when dealing with nested types.
2023-12-18 09:19:13 +01:00
Stephan Schroevers
17c7b396d2 Simplify AbstractMatcherTestChecker (#853)
By using `TreePathScanner` rather than directly using `TreeScanner`.
2023-11-27 11:40:16 +01:00
Stephan Schroevers
8130ddf59c Introduce IsIdentityOperation matcher for use by Refaster templates (#749) 2023-10-23 14:52:16 +02:00
Stephan Schroevers
fa026de336 Introduce IsEmpty matcher for use by Refaster templates (#744)
While there, generalize a number of Refaster rules using this new matcher.
2023-10-23 09:07:47 +02:00
Stephan Schroevers
5596b584ac [maven-release-plugin] prepare for next development iteration 2023-10-04 16:40:37 +02:00
Stephan Schroevers
4800522a09 [maven-release-plugin] prepare release v0.14.0 2023-10-04 16:40:37 +02:00
Picnic-Bot
82025a729f Upgrade fmt-maven-plugin 2.20 -> 2.21.1 (#804)
See:
- https://github.com/spotify/fmt-maven-plugin/releases/tag/2.21
- https://github.com/spotify/fmt-maven-plugin/releases/tag/2.21.1
- https://github.com/spotify/fmt-maven-plugin/compare/fmt-maven-plugin-2.20...2.21.1
2023-10-04 10:29:27 +02:00
Stephan Schroevers
48e2f57cb6 [maven-release-plugin] prepare for next development iteration 2023-08-28 19:22:11 +03:00
Stephan Schroevers
352829c61f [maven-release-plugin] prepare release v0.13.0 2023-08-28 19:22:11 +03:00
Stephan Schroevers
dc36ff2c0b [maven-release-plugin] prepare for next development iteration 2023-06-21 21:15:38 +02:00
Stephan Schroevers
09208aa49a [maven-release-plugin] prepare release v0.12.0 2023-06-21 21:15:38 +02:00
Stephan Schroevers
b81ec973a1 Upgrade Error Prone 2.19.1 -> 2.20.0 (#685)
Summary of key changes:
- The `MissingRefasterAnnotation` check was contributed to Error Prone,
  and so is deleted here (multiple checks with the same name are not
  supported).
- Similarly, Error Prone now supports the `-XepAllSuggestionsAsWarnings`
  flag out of the box. So the `ErrorProneFork` class is deleted, as it
  has currently no further use.

While there, include a tweak to `run-mutation-tests.sh`.

Fixes #686.

See:
- https://github.com/google/error-prone/releases/tag/v2.20.0
- https://github.com/google/error-prone/compare/v2.19.1...v2.20.0
- https://github.com/PicnicSupermarket/error-prone/compare/v2.19.1-picnic-1...v2.20.0-picnic-1
2023-06-20 15:52:26 +02:00
Luke Prananta
cc2c49edc3 Introduce OptionalOrElseGet Refaster rule (#527)
While there, introduce `IsLikelyTrivialComputation` Matcher.
2023-05-26 09:19:51 +02:00
Stephan Schroevers
8bc878a05c Improve AbstractMatcherTestChecker (#599)
These changes enable testing of a wider range of `Matcher` implementations. In
a nutshell:
- The `Matcher` under test is now passed `VisitorState` instances with an
  accurate `TreePath`.
- The `Matcher` under test is no longer consulted for method select and cast
  type expressions, mirroring Refaster behavior.
2023-05-26 08:29:26 +02:00
Stephan Schroevers
3df6dc957d [maven-release-plugin] prepare for next development iteration 2023-05-16 17:38:46 +02:00
Stephan Schroevers
a1ecd816ff [maven-release-plugin] prepare release v0.11.1 2023-05-16 17:38:46 +02:00
Stephan Schroevers
f52a93cc4e [maven-release-plugin] prepare for next development iteration 2023-05-14 17:09:09 +02:00
Stephan Schroevers
610085393c [maven-release-plugin] prepare release v0.11.0 2023-05-14 17:09:08 +02:00
Picnic-Bot
08e55fdfb6 Upgrade Error Prone 2.18.0 -> 2.19.1 (#621)
Resolves #622.

See:
- https://github.com/google/error-prone/releases/tag/v2.19.0
- https://github.com/google/error-prone/releases/tag/v2.19.1
- https://github.com/google/error-prone/compare/v2.18.0...v2.19.1
- https://github.com/PicnicSupermarket/error-prone/compare/v2.18.0-picnic-1...v2.19.1-picnic-1
2023-05-14 17:01:46 +02:00
Luke Prananta
7cf569cca3 Introduce IsRefasterAsVarargs matcher for use by Refaster templates (#623) 2023-05-14 16:33:32 +02:00
Stephan Schroevers
3ee28f2c05 [maven-release-plugin] prepare for next development iteration 2023-05-04 12:47:28 +02:00
Stephan Schroevers
bb122388f5 [maven-release-plugin] prepare release v0.10.0 2023-05-04 10:02:03 +02:00
Stephan Schroevers
e0c795d248 Introduce SonarCloud integration and resolve assorted violations (#575) 2023-04-25 08:19:11 +02:00
Stephan Schroevers
b273502e88 [maven-release-plugin] prepare for next development iteration 2023-03-31 09:31:01 +02:00
Stephan Schroevers
8c6bd1b6e7 [maven-release-plugin] prepare release v0.9.0 2023-03-31 09:30:59 +02:00
Pieter Dirk Soels
61c9f67f66 Introduce MockitoMockClassReference check (#454)
Flags Mockito mock and spy creation expressions that explicitly specify the
type of mock or spy to create, while this information can also be inferred from
context.
2023-03-06 09:54:26 +01:00