File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
liquidjava-verifier/src/main/java/liquidjava/api Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 99import liquidjava .diagnostics .warnings .CustomWarning ;
1010import liquidjava .processor .RefinementProcessor ;
1111import spoon .Launcher ;
12+ import spoon .compiler .Environment ;
1213import spoon .processing .ProcessingManager ;
1314import spoon .reflect .declaration .CtPackage ;
1415import spoon .reflect .factory .Factory ;
@@ -53,12 +54,14 @@ public static void launch(String... paths) {
5354 }
5455 launcher .addInputResource (path );
5556 }
56- launcher .getEnvironment ().setNoClasspath (true );
57- launcher .getEnvironment ().setComplianceLevel (8 );
57+
58+ Environment env = launcher .getEnvironment ();
59+ env .setNoClasspath (true );
60+ env .setComplianceLevel (8 );
5861
5962 boolean buildSuccess = launcher .getModelBuilder ().build ();
60- if (!buildSuccess ) {
61- diagnostics .add (new CustomWarning ("Java compilation error detected . Verification might be affected." ));
63+ if (!buildSuccess && ( env . getErrorCount () > 0 || env . getWarningCount () > 0 ) ) {
64+ diagnostics .add (new CustomWarning ("Java compilation encountered issues . Verification may be affected." ));
6265 }
6366
6467 final Factory factory = launcher .getFactory ();
You can’t perform that action at this time.
0 commit comments