Skip to content

Commit 3dda6fd

Browse files
committed
disable scan tool
1 parent 0aa82d9 commit 3dda6fd

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

compiler-plugin-tests/src/test/java/io/ballerina/stdlib/log/compiler/staticcodeanalyzer/StaticCodeAnalyzerTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,15 @@ public void pullScanTool() throws IOException, InterruptedException {
6767
Assert.assertFalse(ExitCode.hasFailure(output.getExitCode()));
6868
}
6969

70-
@Test
70+
@Test(enabled = false)
7171
public void validateRulesJson() throws IOException {
7272
String expectedRules = "[" + Arrays.stream(LogRule.values())
7373
.map(LogRule::toString).collect(Collectors.joining(",")) + "]";
7474
String actualRules = Files.readString(JSON_RULES_FILE_PATH);
7575
assertJsonEqual(normalizeJson(actualRules), normalizeJson(expectedRules));
7676
}
7777

78-
@Test
78+
@Test(enabled = false)
7979
public void testStaticCodeRules() throws IOException, InterruptedException {
8080
for (LogRule rule : LogRule.values()) {
8181
String targetPackageName = "rule" + rule.getId();

compiler-plugin/src/main/java/io/ballerina/stdlib/log/compiler/LogCompilerPlugin.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,22 @@
2020

2121
import io.ballerina.projects.plugins.CompilerPlugin;
2222
import io.ballerina.projects.plugins.CompilerPluginContext;
23-
import io.ballerina.scan.ScannerContext;
24-
import io.ballerina.stdlib.log.compiler.staticcodeanalyzer.StaticCodeAnalyzer;
23+
//import io.ballerina.scan.ScannerContext;
24+
//import io.ballerina.stdlib.log.compiler.staticcodeanalyzer.StaticCodeAnalyzer;
2525

2626
/**
2727
* log module Compiler plugin.
2828
*/
2929
public class LogCompilerPlugin extends CompilerPlugin {
3030

31-
private static final String SCANNER_CONTEXT = "ScannerContext";
31+
// private static final String SCANNER_CONTEXT = "ScannerContext";
3232

3333
@Override
3434
public void init(CompilerPluginContext context) {
35-
Object object = context.userData().get(SCANNER_CONTEXT);
36-
if (object instanceof ScannerContext scannerContext) {
37-
context.addCodeAnalyzer(new StaticCodeAnalyzer(scannerContext.getReporter()));
38-
}
35+
//
36+
// Object object = context.userData().get(SCANNER_CONTEXT);
37+
// if (object instanceof ScannerContext scannerContext) {
38+
// context.addCodeAnalyzer(new StaticCodeAnalyzer(scannerContext.getReporter()));
39+
// }
3940
}
4041
}

0 commit comments

Comments
 (0)