Skip to content

Fix typos, over-claiming and inconsistent recipe display names and descriptions - #1231

Merged
timtebeek merged 1 commit into
mainfrom
tim/n8-display-names-descriptions
Oct 25, 2026
Merged

timtebeek merged 1 commit into
mainfrom
tim/n8-display-names-descriptions

Conversation

@timtebeek

Copy link
Copy Markdown
Member

Several recipe display names and descriptions had typos, claimed more than the recipe does, or didn't follow the marketplace conventions (sentence case, verb first, backticks around code, full sentences). Only display names, descriptions, option descriptions, tags and category descriptions change; no recipe names or behaviour. recipes.csv is regenerated with ./gradlew recipeCsvGenerate.

Typos and wrong names: "singlar" in AssumeNotNullToAssumptions, @ExtendsWith in RemoveObsoleteRunners, @Parameterized in JUnitParamsRunnerToParameterized, "by by" in IsEqualToIgnoringMillisToIsCloseTo, "Junit" in AssertTrueComparisonToAssertEquals, and "non final"/"non private" in TempDirNonFinal and LifecycleNonPrivate.

Descriptions rewritten to match what the recipe does (I read each recipe first):

  • JUnitAssertArrayEqualsToAssertThat produces containsExactly(), not contains().
  • RemoveExtendsEasyMockSupport only removes the extends clause.
  • JMockitMockUpToMockito drops @Mock methods that fake private methods; it doesn't leave them alone.
  • PowerMockitoDoStubbingToMockito leaves private-method stubbing unchanged and adds a comment; only non-private methods are rewritten.
  • AssertThatBooleanToAssertJ matches assertThat(String, boolean).
  • HamcrestOfMatchersToAssertJ also handles allOf.
  • UpgradeToJUnit513/UpgradeToJUnit514 no longer claim to migrate "all deprecated APIs".

Sentence case, verb-first: the seven AssertJ*Rules (changed in the @RecipeDescriptor source, not the generated recipes), ReplaceArquillianInSequenceAnnotation, ArquillianJUnit4ToArquillianJUnit5, VertxUnitToVertxJunit5, CleanupAssertions, UseXMLUnitLegacy, UpgradeSurefirePlugin, ExplicitContainerImages, Testcontainers2ContainerClasses, Mockito1to3Migration/Mockito1to4Migration/Mockito1to5Migration, and the capitalised "To" in AssertToAssertions, ExpectedExceptionToAssertThrows and UpdateMockWebServer.

Backticks: added in AssertTrueInstanceofToAssertInstanceOf, HandleExternalResourceRules, TestRuleToTestInfo, RemoveDuplicateTestTemplates (whose description now says what it does: drop @Test next to @RepeatedTest), SimplifySequencedCollectionAssertions and JUnitFailToAssertJFail.

Generic or fragment descriptions:

  • The four identical "Applies best practices to tests." descriptions (cleanup.BestPractices, JupiterBestPractices, JUnit5BestPractices, JUnit6BestPractices) now say what each one covers.
  • The "This recipe will …" descriptions in dbrider.yml, easymock.yml, jmockit.yml and MinimumJreConditions are rewritten as plain sentences.
  • The fragments in UseHamcrestAssertThat and ReplacePowerMockito are now complete sentences.

Others:

  • The HamcrestMatcherToAssertJ and HamcrestNotMatcherToAssertJ options said "migrate to JUnit5"; they now say AssertJ.
  • SystemPropertyRulesToPioneer no longer names its sibling recipe.
  • SimplifyMockitoVerifyWhenGiven gets a display name that describes the change instead of the Sonar rule title.
  • ConsistentHamcrestMatcherImports and MigrateHamcrestToJUnit5 lose the wrong assertj tag; the latter is tagged junit instead.
  • The AssertJ, Mockito and Google Truth categories get descriptions.

Skipped:

The regenerated recipes.csv also bumped the recipeCount of five composites (Assertj, JUnitToAssertj, JUnit4to5Migration, JUnit5BestPractices, UseMockitoExtension). Those counts come from dependency recipes, not from this change, so I kept them at their current values.

Verified with ./gradlew compileJava compileTestJava recipeCsvGenerate recipeCsvValidate, then the tests of every touched recipe and YAML composite, plus the JUnit 4 to 5, JUnit 5 to 6, Mockito and best-practices integration tests: 111 classes, 945 tests, 0 failures, 7 skipped.

Fixes item N8 of #1211.

@github-project-automation github-project-automation Bot moved this to In Progress in OpenRewrite Oct 25, 2026
@timtebeek
timtebeek merged commit c934a8a into main Oct 25, 2026
2 checks passed
@timtebeek
timtebeek deleted the tim/n8-display-names-descriptions branch October 25, 2026 13:19
@github-project-automation github-project-automation Bot moved this from In Progress to Done in OpenRewrite Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

1 participant