Skip to content

Commit fb8340e

Browse files
committed
removed javadoc
1 parent 501dedc commit fb8340e

File tree

3 files changed

+2
-42
lines changed

3 files changed

+2
-42
lines changed

config/suppressions.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@
88
<suppress checks="MissingJavadocType" files=".*"/>
99
<suppress checks="JavadocVariable" files=".*"/>
1010
<suppress checks="MissingJavadocMethod" files=".*"/>
11+
<suppress checks="DesignForExtension" files="[\\/]src[\\/]test[\\/]java[\\/]org[\\/]checkstyle[\\/]autofix[\\/]recipe[\\/]AbstractRecipeTest\.java"/>
1112
</suppressions>

src/test/java/org/checkstyle/autofix/InputClassRenamer.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,9 @@ public TreeVisitor<?, ExecutionContext> getVisitor() {
4444
return new ClassRenameVisitor();
4545
}
4646

47-
/**
48-
* A visitor that traverse Java AST nodes and renames classes starting with "Input" to "Output".
49-
*/
5047
private static final class ClassRenameVisitor extends JavaIsoVisitor<ExecutionContext> {
5148

52-
/** The prefix to match in class names. */
5349
private static final String FROM_PREFIX = "Input";
54-
/** The prefix to replace with in class names. */
5550
private static final String TO_PREFIX = "Output";
5651

5752
@Override
@@ -82,13 +77,6 @@ public J.NewClass visitNewClass(J.NewClass constructorNode,
8277
return result;
8378
}
8479

85-
/**
86-
* Checks if a given class name starts with the FROM_PREFIX
87-
* and returns the renamed version with TO_PREFIX.
88-
*
89-
* @param originalName The original class name.
90-
* @return The new class name with TO_PREFIX if matched, otherwise null.
91-
*/
9280
private String renameIfMatch(String originalName) {
9381
final String result;
9482
if (originalName.startsWith(FROM_PREFIX)) {

src/test/java/org/checkstyle/autofix/recipe/AbstractRecipeTest.java

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -28,47 +28,18 @@
2828
import org.openrewrite.Recipe;
2929
import org.openrewrite.test.RewriteTest;
3030

31-
/**
32-
* Base test class for recipe testing that provides common functionality
33-
* for reading test files and executing recipe tests with preprocessing.
34-
*/
3531
public abstract class AbstractRecipeTest implements RewriteTest {
3632

3733
private static final String BASE_TEST_RESOURCES_PATH = "src/test/resources/org"
3834
+ "/checkstyle/autofix/recipe/";
3935

40-
/**
41-
* Creates a preprocessing recipe that normalizes class names from InputXxx to OutputXxx.
42-
* This allows test files to have descriptive names while maintaining consistent class names.
43-
*
44-
* @return the preprocessing recipe
45-
*/
4636
private Recipe createPreprocessingRecipe() {
4737
return new InputClassRenamer();
4838
}
4939

50-
/**
51-
* Creates the main recipe that should be tested.
52-
* Subclasses must implement this method to provide their specific recipe.
53-
*
54-
* @return the main recipe to test
55-
*/
5640
protected abstract Recipe getRecipe();
5741

58-
/**
59-
* Tests a recipe with the given recipe path and test case name.
60-
* Expects input and output files to follow the naming convention:
61-
* - Input: {recipePath}/{testCaseName}/Input{testCaseName}.java
62-
* - Output: {recipePath}/{testCaseName}/Output{testCaseName}.java
63-
* The method automatically applies preprocessing to normalize class names
64-
* before running the main recipe.
65-
*
66-
* @param recipePath the recipe-specific path.
67-
* @param testCaseName the name of the test case (should match directory and file names)
68-
* @throws IOException if files cannot be read
69-
*/
70-
protected void testRecipe(String recipePath, String testCaseName)
71-
throws IOException {
42+
protected void testRecipe(String recipePath, String testCaseName) throws IOException {
7243
final String testCaseDir = testCaseName.toLowerCase();
7344
final String inputFileName = "Input" + testCaseName + ".java";
7445
final String outputFileName = "Output" + testCaseName + ".java";

0 commit comments

Comments
 (0)