-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
803 changed files
with
76,737 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
* text eol=lf | ||
*.bat -text | ||
*.jar -text | ||
*.cls -text | ||
*.trigger -text | ||
its/sources/** -text | ||
its/plugin/projects/** -text | ||
**/src/test/resources/** -text | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners | ||
.github/CODEOWNERS @sonarsource/analysis-jvm-squad | ||
.github/CODEOWNERS @SonarSource/analysis-jvm-squad |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# --- Gradle | ||
.gradle/ | ||
build/ | ||
|
||
# ---- Maven | ||
target/ | ||
dependency-reduced-pom.xml | ||
|
||
# ---- SonarQube analysis | ||
.scannerwork/ | ||
.sonar/ | ||
|
||
# ---- IntelliJ IDEA | ||
*.iws | ||
*.iml | ||
*.ipr | ||
.idea/ | ||
out/ | ||
bin/ | ||
|
||
# ---- Eclipse | ||
.classpath | ||
.project | ||
.settings | ||
|
||
# ---- Mac OS X | ||
.DS_Store | ||
Icon? | ||
# Thumbnails | ||
._* | ||
# Files that might appear on external disk | ||
.Spotlight-V100 | ||
.Trashes | ||
|
||
# ---- Windows | ||
# Windows image file caches | ||
Thumbs.db | ||
# Folder config file | ||
Desktop.ini | ||
|
||
.java-version | ||
test-report.out | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "its/sources"] | ||
path = its/sources | ||
url = https://github.com/SonarSource/slang-test-sources.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* | ||
* SonarSource Go | ||
* Copyright (C) 2018-$YEAR SonarSource SA | ||
* mailto:info AT sonarsource DOT com | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU Lesser General Public | ||
* License as published by the Free Software Foundation; either | ||
* version 3 of the License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with this program; if not, write to the Free Software Foundation, | ||
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,47 @@ | ||
# sonar-go | ||
# Sonar-Go | ||
|
||
Go Analyzer | ||
[![Build Status](https://api.cirrus-ci.com/github/SonarSource/slang.svg?branch=master)](https://cirrus-ci.com/github/SonarSource/slang) | ||
[![Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=org.sonarsource.slang%3Aslang&metric=alert_status)](https://sonarcloud.io/dashboard?id=org.sonarsource.slang%3Aslang) | ||
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=org.sonarsource.slang%3Aslang&metric=coverage)](https://sonarcloud.io/component_measures/domain/Coverage?id=org.sonarsource.slang%3Aslang) | ||
|
||
This is a developer documentation. If you want to analyze source code in SonarQube read one of the following documentation: | ||
|
||
We use the native Go parser to parse the Go language. | ||
|
||
## 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 | ||
|
||
If you are on Windows, read the [sonar-go-to-slang/README.md](sonar-go-to-slang/README.md) instructions. | ||
|
||
|
||
### Build | ||
Build and run Unit Tests: | ||
|
||
./gradlew build | ||
|
||
## Integration Tests | ||
|
||
By default, Integration Tests (ITs) are skipped during builds. | ||
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 | ||
|
||
You can also build and run only Ruling Tests using the `ruling` property: | ||
|
||
./gradlew build -Pruling --info --no-daemon | ||
|
||
## 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. | ||
Also the Go source files are not handled. For those files use a manual script like below to update the license: | ||
`find . -type f -name "*.go" -exec sed -i '' 's/2018-2023/2018-2024/' "{}" \;` |
Oops, something went wrong.