Repository navigation
Fix typos, over-claiming and inconsistent recipe display names and descriptions - #1231
Merged
Merged
Conversation
23 of 76 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.csvis regenerated with./gradlew recipeCsvGenerate.Typos and wrong names: "singlar" in
AssumeNotNullToAssumptions,@ExtendsWithinRemoveObsoleteRunners,@ParameterizedinJUnitParamsRunnerToParameterized, "byby" inIsEqualToIgnoringMillisToIsCloseTo, "Junit" inAssertTrueComparisonToAssertEquals, and "non final"/"non private" inTempDirNonFinalandLifecycleNonPrivate.Descriptions rewritten to match what the recipe does (I read each recipe first):
JUnitAssertArrayEqualsToAssertThatproducescontainsExactly(), notcontains().RemoveExtendsEasyMockSupportonly removes theextendsclause.JMockitMockUpToMockitodrops@Mockmethods that fake private methods; it doesn't leave them alone.PowerMockitoDoStubbingToMockitoleaves private-method stubbing unchanged and adds a comment; only non-private methods are rewritten.AssertThatBooleanToAssertJmatchesassertThat(String, boolean).HamcrestOfMatchersToAssertJalso handlesallOf.UpgradeToJUnit513/UpgradeToJUnit514no longer claim to migrate "all deprecated APIs".Sentence case, verb-first: the seven
AssertJ*Rules(changed in the@RecipeDescriptorsource, not the generated recipes),ReplaceArquillianInSequenceAnnotation,ArquillianJUnit4ToArquillianJUnit5,VertxUnitToVertxJunit5,CleanupAssertions,UseXMLUnitLegacy,UpgradeSurefirePlugin,ExplicitContainerImages,Testcontainers2ContainerClasses,Mockito1to3Migration/Mockito1to4Migration/Mockito1to5Migration, and the capitalised "To" inAssertToAssertions,ExpectedExceptionToAssertThrowsandUpdateMockWebServer.Backticks: added in
AssertTrueInstanceofToAssertInstanceOf,HandleExternalResourceRules,TestRuleToTestInfo,RemoveDuplicateTestTemplates(whose description now says what it does: drop@Testnext to@RepeatedTest),SimplifySequencedCollectionAssertionsandJUnitFailToAssertJFail.Generic or fragment descriptions:
cleanup.BestPractices,JupiterBestPractices,JUnit5BestPractices,JUnit6BestPractices) now say what each one covers.dbrider.yml,easymock.yml,jmockit.ymlandMinimumJreConditionsare rewritten as plain sentences.UseHamcrestAssertThatandReplacePowerMockitoare now complete sentences.Others:
HamcrestMatcherToAssertJandHamcrestNotMatcherToAssertJoptions said "migrate to JUnit5"; they now say AssertJ.SystemPropertyRulesToPioneerno longer names its sibling recipe.SimplifyMockitoVerifyWhenGivengets a display name that describes the change instead of the Sonar rule title.ConsistentHamcrestMatcherImportsandMigrateHamcrestToJUnit5lose the wrongassertjtag; the latter is taggedjunitinstead.Skipped:
Mockito4to5Only: its description ("Does not include 1.x to 4.x migration") states the intended behaviour. The recipe list is what's wrong, and fixing it is item A1, which is still open. Rewording the description now would document the bug.AssertEqualsIntegralDeltaToAssertEquals: its description was already corrected in Only drop a literal zero delta inAssertEqualsIntegralDeltaToAssertEquals #1212.The regenerated
recipes.csvalso bumped therecipeCountof 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.