SLang (Sonar Language) is a framework to quickly develop code analyzers for SonarQube to help developers write projects with integrated code quality and security.
SLang defines language-agnostic AST. Using this AST we can develop simple syntax-based rules. Then we use a parser for real language to create this AST.
To provide feedback (request a feature, report a bug, etc.) use the SonarQube Community Forum. Please do not forget to specify the language, plugin version, and SonarQube version.
You will need Java 21 installed.
git submodule update --init --recursive
Build and run Unit Tests:
./gradlew build
License headers are automatically updated by the spotless plugin but only for Java files.
Furthermore, there are files such as package-info.java and module-info.java that spotless ignores. For those files use a manual script like below to update the license. E.g. on Mac:
`find . -type f -name "*-info.java" -exec sed -i '' 's/2018-2024/2018-2025/' "{}" \;`
Copyright 2018-2026 SonarSource
SonarQube analyzers released after November 29, 2024, including patch fixes for prior versions, are published under the Sonar Source-Available License Version 1 (SSALv1).
See individual files for details that specify the license applicable to each file. Files subject to the SSALv1 will be noted in their headers.
(top 30 of 51)
120 commits
116 commits
102 commits
70 commits
Java
95.0%
Slang
4.2%
SLang (Sonar Language) is a framework to quickly develop code analyzers for SonarQube to help developers write projects with integrated code quality and security.
SLang defines language-agnostic AST. Using this AST we can develop simple syntax-based rules. Then we use a parser for real language to create this AST.
To provide feedback (request a feature, report a bug, etc.) use the SonarQube Community Forum. Please do not forget to specify the language, plugin version, and SonarQube version.
You will need Java 21 installed.
git submodule update --init --recursive
Build and run Unit Tests:
./gradlew build
License headers are automatically updated by the spotless plugin but only for Java files.
Furthermore, there are files such as package-info.java and module-info.java that spotless ignores. For those files use a manual script like below to update the license. E.g. on Mac:
`find . -type f -name "*-info.java" -exec sed -i '' 's/2018-2024/2018-2025/' "{}" \;`
Copyright 2018-2026 SonarSource
SonarQube analyzers released after November 29, 2024, including patch fixes for prior versions, are published under the Sonar Source-Available License Version 1 (SSALv1).
See individual files for details that specify the license applicable to each file. Files subject to the SSALv1 will be noted in their headers.
(top 30 of 51)
120 commits
116 commits
102 commits
70 commits
Java
95.0%
Slang
4.2%