Skip to content

Commit

Permalink
fix: Update compliance level in SpoonBasedAnalyzer
Browse files Browse the repository at this point in the history
The compliance level in the SpoonBasedAnalyzer class has been reduced from 20 to 17. This change might affect the way certain constructs are handled by the Java compiler, hence it might have an impact on the functionality of the code.
  • Loading branch information
MartinWitt committed Jan 17, 2024
1 parent c6d1077 commit a098d9e
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@

import com.google.common.flogger.FluentLogger;
import io.github.martinwitt.laughing_train.domain.entity.AnalyzerResult;
import spoon.Launcher;
import spoon.SpoonAPI;
import spoon.reflect.CtModel;
import spoon.reflect.declaration.CtType;
import xyz.keksdose.spoon.code_solver.analyzer.spoon.api.SpoonRules;

import java.io.File;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import spoon.Launcher;
import spoon.SpoonAPI;
import spoon.reflect.CtModel;
import spoon.reflect.declaration.CtType;
import xyz.keksdose.spoon.code_solver.analyzer.spoon.api.SpoonRules;

public class SpoonBasedAnalyzer {

Expand All @@ -30,7 +31,7 @@ public List<? extends AnalyzerResult> analyze(Path sourceRoot) {
launcher.getEnvironment().setAutoImports(true);
launcher.getEnvironment().setIgnoreDuplicateDeclarations(true);
launcher.getEnvironment().setNoClasspath(true);
launcher.getEnvironment().setComplianceLevel(20);
launcher.getEnvironment().setComplianceLevel(17);
launcher.getEnvironment().setIgnoreSyntaxErrors(true);
launcher.getEnvironment().setLevel("ERROR");
CtModel model = launcher.buildModel();
Expand Down

0 comments on commit a098d9e

Please sign in to comment.