The purpose of this PR is to develop a Ballerina tool that performs static code analysis for Ballerina projects for identifying potential bugs, security vulnerabilities, and style violations and report analysis issues to static code analysis platforms like SonarQube.
Creating a Ballerina scan tool for performing core static code analysis based on language specific rules
Extending the Ballerina scan tool for reporting analysis issues to static code analysis platforms
Extending the Ballerina scan tool for introducing additional library specific rules and external rules
Approach
The initial release introduces the bal scan command. Current implementation uses the project API to retrieve syntax trees of all Ballerina files in a project for performing core analysis and generating an analysis report. However the generated report will have no issues as core rules are not implemented yet. As core analysis rules are reviewed and implemented, the scan tool will progressively gain the ability to identify and report potential issues and further features will be added iteratively as outlined in task #42260
Purpose
The purpose of this PR is to develop a Ballerina tool that performs static code analysis for Ballerina projects for identifying potential bugs, security vulnerabilities, and style violations and report analysis issues to static code analysis platforms like SonarQube.
Fixes #42256
Goals
Approach
The initial release introduces the
bal scan
command. Current implementation uses the project API to retrieve syntax trees of all Ballerina files in a project for performing core analysis and generating an analysis report. However the generated report will have no issues as core rules are not implemented yet. As core analysis rules are reviewed and implemented, the scan tool will progressively gain the ability to identify and report potential issues and further features will be added iteratively as outlined in task #42260Check List