JSpecify's annotations have more well-defined semantics. Its `@Nullable`
annotation is also a type-use annotation recognized by Google Java
Format, so the formatter places it after any field or method modifiers.
See https://jspecify.dev
By emitting a website link, if available, and reporting the matching Refaster
rule in the description's message rather than the check name. Additionally, it
is now possible to provide a custom explanatory text, to assign a custom
severity to Refaster rules, and to override the severity of matches for all
Refaster rules by passing `-Xep:Refaster:[SEVERITY]`.
Violations of Refaster rules defined in this repository now include a link to
the rule's documentation, hosted on https://error-prone.picnic.tech.
As the former term references a class containing one or more `@BeforeTemplate`
methods, one or more `@Placeholder` methods and an optional `@AfterTemplate`,
while the latter term more narrowly references a single `@BeforeTemplate` or
`@AfterTemplate` method.
This new matcher is used to improve the `AssertThatIsOdd` and
`AssertThatIsEven` Refaster templates.
While there, apply assorted semi-related test improvements.
This rule is implemented using a Refaster template, relying on the new
`ThrowsCheckedException` matcher.
While there, introduce `AbstractTestChecker` to simplify the test setup for
Refaster `Matcher`s. This base class flags all `ExpressionTree`s matched by the
`Matcher` under test.
This new checker inspects inline code passed to `CompilationTestHelper` and
`BugCheckerRefactoringTestHelper` instances. It requires that this code is
properly formatted and that its imports are organized. Only code that
represents the expected output of a refactoring operation is allowed to have
unused imports, as most `BugChecker`s do not (and are not able to) remove
imports that become obsolete as a result of applying their suggested fix(es).