Skip to content

Commit

Permalink
Issue #1: Create a application what parses xdocs with example config …
Browse files Browse the repository at this point in the history
…specified
  • Loading branch information
piyush kumar sadangi authored and piyush kumar sadangi committed Jun 21, 2024
1 parent 7c15dd4 commit 55da0c7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions extractor/src/main/java/com/example/extractor/Main.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

package com.example.extractor;

import java.nio.file.*;
Expand Down Expand Up @@ -27,7 +28,7 @@ public static void main(String[] args) throws Exception {
String inputDirectory = checkstyleRepoPath + "/" + pathInRepo;

System.out.println("PROJECT_ROOT: " + PROJECT_ROOT);
Path outputDirectory = PROJECT_ROOT.resolve("AbbreviationAsWordInName");
Path outputDirectory = PROJECT_ROOT.resolve("AbstractClassName");

// Process files in the input directory and save results to the output directory
processFiles(inputDirectory, outputDirectory.toString());
Expand Down Expand Up @@ -103,4 +104,4 @@ private static void processFile(String exampleFile, Path outputPath) {
e.printStackTrace();
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public class MainsLauncherTest {
@Test
public void testMain() throws Exception {
// Define the path in repo you want to test
String pathInRepo = "src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/abbreviationaswordinname";
String pathInRepo = "src/xdocs-examples/resources/com/puppycrawl/tools/checkstyle/checks/naming/abstractclassname";

// Pass the path as an argument
Main.main(new String[]{pathInRepo});
Expand Down

0 comments on commit 55da0c7

Please sign in to comment.