https://github.com/sonarsource/slang
https://github.com/sonarsource/slang
language-team
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/sonarsource/slang
- Owner: SonarSource
- License: other
- Created: 2018-05-28T14:52:00.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2025-06-21T00:24:11.000Z (7 months ago)
- Last Synced: 2025-06-21T01:30:20.779Z (7 months ago)
- Topics: language-team
- Language: Java
- Size: 6.83 MB
- Stars: 90
- Watchers: 27
- Forks: 32
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
- Security: SECURITY.md
Awesome Lists containing this project
README
# SLang
[](https://cirrus-ci.com/github/SonarSource/slang)
[](https://sonarcloud.io/dashboard?id=org.sonarsource.slang%3Aslang)
[](https://sonarcloud.io/component_measures/domain/Coverage?id=org.sonarsource.slang%3Aslang)
SLang (SonarSource Language) is a framework to quickly develop code analyzers for SonarQube to help developers write [Clean Code](https://www.sonarsource.com/solutions/clean-code/?utm_medium=referral&utm_source=github&utm_campaign=clean-code&utm_content=slang).
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.
## Have questions or feedback?
To provide feedback (request a feature, report a bug, etc.) use the [SonarQube Community Forum](https://community.sonarsource.com/). Please do not forget to specify the language, plugin version, and SonarQube version.
## Building
### Setup
Install Java 17.
### Build
Build and run Unit Tests:
./gradlew build
## License headers
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/' "{}" \;`
## License
Copyright 2018-2025 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)](LICENSE).
See individual files for details that specify the license applicable to each file.
Files subject to the SSALv1 will be noted in their headers.