ballerina-platform / static-code-analysis-tool

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

Allow suppressing analysis in specific places #20

Open MaryamZi opened 1 month ago

MaryamZi commented 1 month ago

Description:

Right now, the scan tool allows skipping specific rules when performing a scan. These apply to the entire scan.

E.g.,

bal scan --exclude-rules="ballerina:101, ballerina/io:201"

But, it is not possible to suppress analysis only at specific lines of code.

We may most probably need an annotation for this. Also see https://stackoverflow.com/questions/10971968/turning-sonar-off-for-certain-code

MaryamZi commented 1 month ago

Whichever method we choose needs to

Some points to consider with annotations