ballerina-platform / static-code-analysis-tool

Tool for performing static code analysis for Ballerina projects.
Apache License 2.0
3 stars 5 forks source link

Add a Public API to Engage the Scan Tool and Verify the Output #27

Open MohamedSabthar opened 1 month ago

MohamedSabthar commented 1 month ago

Problem

Currently, the scan tool doesn't implement any public API for testing. We need a way to test domain-specific static code rules when they are added to the Ballerina library via a compiler plugin.

Related issue: https://github.com/ballerina-platform/ballerina-library/issues/7293

Proposed Solution

Introduce a public API. Research is needed for the design and implementation.

Alternatives

No response

Version

No response

MaryamZi commented 1 month ago

Compiler plugins perform the scan tool related analysis only when the ScanContext is added to the CompilerContext, which isn't really straightforward to do, so implementing a TestScanContext and TestReported isn't an option either.

Atm, we'll have to do a bal scan to get the analysis to run.