Skip to content
No description or website provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
gradle/wrapper Create slang-enterprise gradle build Nov 29, 2018
its
slang-antlr
slang-api Update license header manually because 'com.github.hierynomus.license… Apr 24, 2019
slang-checks
slang-plugin Update license header manually because 'com.github.hierynomus.license… Apr 24, 2019
slang-testing
sonar-kotlin-plugin
sonar-ruby-plugin
sonar-scala-plugin Update license header manually because 'com.github.hierynomus.license… Apr 24, 2019
utils Update license header manually because 'com.github.hierynomus.license… Apr 24, 2019
.gitattributes Update git attributes and gradle wrapper Dec 13, 2018
.gitignore Update git attributes and gradle wrapper Dec 13, 2018
.gitmodules Create slang-enterprise gradle build Nov 29, 2018
.travis.yml
LICENSE_HEADER
README.md Fixed link to the SonarScala documentation Apr 2, 2019
build.gradle Use JDK 11 with release flag Apr 25, 2019
gradle.properties Prepare for next development iteration (#36) Mar 13, 2019
gradlew
gradlew.bat
settings.gradle Update repox url Feb 26, 2019
travis.sh Add missing env var for travis Nov 30, 2018

README.md

SLang

Build Status Quality Gate Coverage

This is a developer documentation. If you want to analyze source code in SonarQube read one of the following documentations:

SLang (SonarSource Language) is a framework to quickly develop code analyzers for SonarQube. SLang defines language agnostic AST. Using this AST we can develop simple syntax based rules. Then we use parser for real language to create this AST. Currently Kotlin, Ruby and Scala analyzers use this approach.

Kotlin

We use embeddable library of Kotlin compiler to create AST and visitor to create SLang AST.

Ruby

We use whitequark parser to parse Ruby language by embedding it using JRuby runtime.

  • AST documentation for the parser can be found here
  • We use simple Ruby script to call the parser and invoke our visitor written in Java

Scala

We use Scalameta to parse Scala language.

Building

Build and run Unit Tests:

./gradlew build

Integration Tests

By default, Integration Tests (ITs) are skipped during build. If you want to run them, you need first to retrieve the related projects which are used as input:

git submodule update --init its/sources

Then build and run the Integration Tests using the its property:

./gradlew build -Pits --info --no-daemon -Dsonar.runtimeVersion=7.4

License headers

When adding a new source file, you will need to add license headers. Instead of copy-pasting blocks, the following command line can be used:

./gradlew licenseFormat
You can’t perform that action at this time.