Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
import java.util.Optional;
import java.util.ServiceLoader;

import static io.ballerina.scan.internal.ScanToolConstants.RUNNING_SCANS_LOG;
import static io.ballerina.scan.internal.ScanToolConstants.SCAN_COMMAND;

/**
Expand Down Expand Up @@ -185,6 +186,9 @@ public void execute() {
return;
}

outputStream.println();
outputStream.println(RUNNING_SCANS_LOG);

ProjectAnalyzer projectAnalyzer = getProjectAnalyzer(project.get(), scanTomlFile.get());
List<Rule> coreRules = CoreRule.rules();
Map<String, List<Rule>> externalAnalyzers;
Expand Down Expand Up @@ -233,9 +237,6 @@ public void execute() {
return;
}

outputStream.println();
outputStream.println("Running Scans");

List<Issue> issues = projectAnalyzer.analyze(coreRules);
issues.addAll(projectAnalyzer.runExternalAnalyzers(externalAnalyzers));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public class ScanToolConstants {
static final String CODE_SMELL = "CODE_SMELL";
static final String RULE_ID = "id";
static final String RULE_DESCRIPTION = "description";
static final String RUNNING_SCANS_LOG = "Running Scans";

public static final String SCANNER_CONTEXT = "ScannerContext";
public static final String FORWARD_SLASH = "/";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
Loading scan tool configurations from src/test/resources/test-resources/bal-project-with-analyzer-configurations/Scan.toml

Running Scans
cannot include and exclude rules at the same time
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
Loading scan tool configurations from src/test/resources/test-resources/bal-project-with-config-file/Scan.toml

Running Scans
RuleID | Rule Kind | Rule Description
---------------------------------------------------------------------------------------------------------------------
ballerina:1 | CODE_SMELL | Avoid checkpanic
Expand All @@ -21,4 +23,4 @@ Loading scan tool configurations from src/test/resources/test-resources/bal-proj
ballerinax/example_module_static_code_analyzer:3 | VULNERABILITY | rule 3
exampleOrg/example_module_static_code_analyzer:1 | CODE_SMELL | rule 1
exampleOrg/example_module_static_code_analyzer:2 | BUG | rule 2
exampleOrg/example_module_static_code_analyzer:3 | VULNERABILITY | rule 3
exampleOrg/example_module_static_code_analyzer:3 | VULNERABILITY | rule 3
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
Loading scan tool configurations from src/test/resources/test-resources/bal-project-with-include-exclude-rule-configurations/Scan.toml

Running Scans
cannot include and exclude rules at the same time
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
Loading scan tool configurations from src\test\resources\test-resources\bal-project-with-analyzer-configurations\Scan.toml

Running Scans
cannot include and exclude rules at the same time
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
Loading scan tool configurations from src\test\resources\test-resources\bal-project-with-config-file\Scan.toml

Running Scans
RuleID | Rule Kind | Rule Description
---------------------------------------------------------------------------------------------------------------------
ballerina:1 | CODE_SMELL | Avoid checkpanic
Expand All @@ -21,4 +23,4 @@ Loading scan tool configurations from src\test\resources\test-resources\bal-proj
ballerinax/example_module_static_code_analyzer:3 | VULNERABILITY | rule 3
exampleOrg/example_module_static_code_analyzer:1 | CODE_SMELL | rule 1
exampleOrg/example_module_static_code_analyzer:2 | BUG | rule 2
exampleOrg/example_module_static_code_analyzer:3 | VULNERABILITY | rule 3
exampleOrg/example_module_static_code_analyzer:3 | VULNERABILITY | rule 3
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
Loading scan tool configurations from src\test\resources\test-resources\bal-project-with-include-exclude-rule-configurations\Scan.toml

Running Scans
cannot include and exclude rules at the same time
Loading