|
1 | | -[![][travis img]][travis] |
2 | | -[![][wercker img]][wercker] |
3 | | -[![][circleci img]][circleci] |
4 | | -[![][teamcity img]][teamcity] |
5 | | -[![][sonar img]][sonar] |
| 1 | +# Sonar Checkstyle |
6 | 2 |
|
7 | | -[![sonar-checkstyle vulnerabilities][snyk-sonar img]][snyk-sonar] |
| 3 | +[](https://travis-ci.org/checkstyle/sonar-checkstyle/builds) |
| 4 | +[/statusIcon)](https://teamcity.jetbrains.com/app/rest/builds/buildType:(id:Checkstyle_SonarCheckstyleIdeaInspectionsMaster)/statusIcon) |
| 5 | +[](https://sonarcloud.io/dashboard?id=checkstyle_sonar-checkstyle) |
| 6 | +[](https://snyk.io/test/github/checkstyle/sonar-checkstyle?targetFile=pom.xml) |
8 | 7 |
|
9 | | -Sonar Checkstyle |
10 | | -========== |
| 8 | +This plugin provides coding rules from [Checkstyle](http://checkstyle.sourceforge.net/) for [Sonar](https://www.sonarsource.com). |
11 | 9 |
|
12 | | -## Description / Features |
| 10 | +--- |
13 | 11 |
|
14 | | -This plugin provides coding rules from [Checkstyle](http://checkstyle.sourceforge.net/). |
| 12 | +## Compatiblity |
15 | 13 |
|
16 | | -Compatibility matrix from Sonar team: https://docs.sonarsource.com/sonarqube/latest/instance-administration/plugin-version-matrix/ |
| 14 | +Compatibility matrix from Sonar: [https://docs.sonarsource.com/sonarqube/latest/instance-administration/plugin-version-matrix/](https://docs.sonarsource.com/sonarqube/latest/instance-administration/plugin-version-matrix/) |
17 | 15 |
|
18 | | -Compatibility matrix from checkstyle team: |
| 16 | +Compatibility matrix from Checkstyle: |
19 | 17 |
|
20 | 18 | | Checkstyle Plugin | Sonar min | Sonar max | Checkstyle | Jdk | |
21 | 19 | |-------------------|-----------|-----------|------------|-----| |
@@ -108,38 +106,10 @@ Compatibility matrix from checkstyle team: |
108 | 106 | | 2.1.1 | 3.6 | -- | 5.6 | 1.6 | |
109 | 107 | | 2 | 3.6 | -- | 5.6 | 1.6 | |
110 | 108 |
|
111 | | -Jdk version depends on checkstyle's and sonar's jdk version: |
| 109 | +--- |
112 | 110 |
|
113 | | -checkstyle:6.0 use jdk6, checkstyle:6.2 use jdk7, checkstyle:7.0 use jdk8. |
114 | | - |
115 | | -sonar:3.6 used jdk6, sonar:4.5 use jdk6, sonar:5.6-7.8 use jdk8, sonar:7.9-latest use jdk11. |
116 | | - |
117 | | -## Usage |
118 | | -Install it from Sonar Update Center: |
119 | | - |
120 | | - |
121 | | -or do it manually: |
122 | | -Dowload latest or required version from https://github.com/checkstyle/sonar-checkstyle/releases . |
123 | | -Place jar file to your sonar instance to "[YOUR_SONAR_PATH]/extensions/plugins", restart Sonar. |
124 | | - |
125 | | -In the quality profile, activate some rules from Checkstyle and run an analysis on your project. |
126 | | - |
127 | | - |
128 | | -[travis]:https://travis-ci.org/checkstyle/sonar-checkstyle/builds |
129 | | -[travis img]:https://secure.travis-ci.org/checkstyle/sonar-checkstyle.png |
130 | | - |
131 | | -[teamcity]:https://teamcity.jetbrains.com/viewType.html?buildTypeId=Checkstyle_SonarCheckstyleIdeaInspectionsMaster |
132 | | -[teamcity img]:https://teamcity.jetbrains.com/app/rest/builds/buildType:(id:Checkstyle_SonarCheckstyleIdeaInspectionsMaster)/statusIcon |
133 | | - |
134 | | -[sonar]:https://sonarcloud.io/dashboard?id=checkstyle_sonar-checkstyle |
135 | | -[sonar img]:https://sonarcloud.io/api/project_badges/measure?project=checkstyle_sonar-checkstyle&metric=alert_status |
136 | | - |
137 | | -[wercker]: https://app.wercker.com/project/bykey/ece513d8a6eb70207dd3b805b63e8d1c |
138 | | -[wercker img]: https://app.wercker.com/status/ece513d8a6eb70207dd3b805b63e8d1c/s/master |
139 | | - |
140 | | -[circleci]: https://circleci.com/gh/checkstyle/sonar-checkstyle/tree/master |
141 | | -[circleci img]: https://circleci.com/gh/checkstyle/sonar-checkstyle/tree/master.svg?style=svg |
142 | | - |
143 | | -[snyk-sonar]: https://snyk.io/test/github/checkstyle/sonar-checkstyle?targetFile=pom.xml |
144 | | -[snyk-sonar img]: https://snyk.io/test/github/checkstyle/sonar-checkstyle/badge.svg?targetFile=pom.xml |
| 111 | +## Installation |
145 | 112 |
|
| 113 | +1. Follow the official [Sonar documentation](https://docs.sonarsource.com/sonarqube/9.8/setup-and-upgrade/install-a-plugin/) to install a plugin from the marketplace, or manually (pick your release from [https://github.com/checkstyle/sonar-checkstyle/releases](https://github.com/checkstyle/sonar-checkstyle/releases). |
| 114 | +2. Configure instances from template rules for the `Checkstyle` repository. |
| 115 | +3. Add rules/instances from the `Checkstyle` repository to your Quality Profile. |
0 commit comments