Skip to content

Commit

Permalink
fix(spoon): Reduce logging from spoon to error
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinWitt committed Jul 14, 2023
1 parent eef7a87 commit 74d9afb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,8 @@ public static List<Path> removeRedundantPaths(List<Path> paths) {
*/
public static List<Path> filterResourcePaths(List<Path> paths) {
return paths.stream()
.filter(path -> {
String pathString = path.toString();
return !pathString.contains("src/main/resources")
&& !pathString.contains("src/test/resources")
&& !pathString.contains("src/test/java");
})
.filter(path -> path.toString().endsWith("src/main/java")
|| path.toString().endsWith("src/test/java"))
.collect(Collectors.toList());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public List<BadSmell> analyze(String path) {
launcher.getEnvironment().setNoClasspath(true);
launcher.getEnvironment().setComplianceLevel(17);
launcher.getEnvironment().setIgnoreSyntaxErrors(true);
launcher.getEnvironment().setLevel("ERROR");
var model = launcher.buildModel();
logger.atInfo().log("Found %s types.", model.getAllTypes().size());
for (CtType<?> type : model.getAllTypes()) {
Expand Down

0 comments on commit 74d9afb

Please sign in to comment.