Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Task]: Implement Static Code Analysis Support for Ballerina #42260

Open
10 of 11 tasks
Xenowa opened this issue Mar 1, 2024 · 2 comments
Open
10 of 11 tasks

[Task]: Implement Static Code Analysis Support for Ballerina #42260

Xenowa opened this issue Mar 1, 2024 · 2 comments
Labels
needTriage The issue has to be inspected and labeled manually Type/Task

Comments

@Xenowa
Copy link

Xenowa commented Mar 1, 2024

Description

Static code analysis examines code without execution, identifying potential issues like bugs, security vulnerabilities, and style violations. It improves software quality by early issue detection, creating better maintainability, and providing enhanced security.

Each programming language has its own unique syntax and semantics. Therefore, effective static code analysis requires tools specifically designed for the language being analyzed. These tools leverage the language's specific characteristics to perform more in-depth and accurate analysis.

Existing static code analysis tools like SonarQube rely on these language-specific code analyzers to extract information and report issues.

This effort focuses on developing a Ballerina tool to perform static code analysis based on sets of rules and report analysis issues to various static code analysis platforms.

Contains steps to Implement #42256

Describe your task(s)

Implementing a Ballerina static-code-analysis-tool

[Phase 1] Creating the core analyzer:

[Phase 2] Introduce extension points for the core analyzer

[Phase 3] Implement additional Ballerina rules

  • Progressively Implement additional Ballerina rules as they get reviewed

Implementing Ballerina analysis issues reporting support for SonarQube via creating the sonar-ballerina plugin:

  • Implement:
    • Feature to report core analysis issues generated via Ballerina scan tool when a scan is triggered via the sonar-scanner CLI
    • Feature to report core analysis issues generated via Ballerina scan tool when a scan is triggered from the Ballerina scan tool
    • Feature to report custom analysis issues generated via Ballerina scan tool
    • Tracked in Add SonarQube ballerina plugins sonar-ballerina#2

Related area

-> Other Area

Related issue(s) (optional)

No response

Suggested label(s) (optional)

No response

Suggested assignee(s) (optional)

No response

@Xenowa
Copy link
Author

Xenowa commented Apr 24, 2024

24/04/2024 Update

@Xenowa
Copy link
Author

Xenowa commented Jun 29, 2024

29/06/2024

  • Demonstrations for creating a static analysis compiler plugin and a static code analysis platform plugin to extend the scan tools capabilities has been made.
  • The ruleKind attribute expected in the compiler plugins rules.json file has been changed to kind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needTriage The issue has to be inspected and labeled manually Type/Task
Projects
None yet
Development

No branches or pull requests

2 participants