Skip to content

Commit e25992d

Browse files
Update README.md
1 parent 521a8b5 commit e25992d

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ You can also add additional tasks to run linters and produce reports. Theses tas
3434

3535
In order to let Sonar analyze your project, you have to provide some configuration. You can define a file named sonar-project.properties at the root of your project with the following information:
3636

37-
```
37+
```ini
3838
# Required metadata
3939
sonar.projectKey=<unique key for your project>
4040
sonar.projectName=<human readable name for your project>
@@ -53,7 +53,7 @@ sonar.sourceEncoding=UTF-8
5353

5454
Example:
5555

56-
```
56+
```ini
5757
# Required metadata
5858
sonar.projectKey=my-project
5959
sonar.projectName=My Project Name
@@ -158,7 +158,7 @@ Same as above, the widget separates the count of duplicated code by language.
158158

159159
You can change the path to every generated report directly in your sonar.properties file by adding the following properties:
160160

161-
```
161+
```ini
162162
# issues reports with default paths
163163
sonar.sii.quality.js.report.path=/reports/sonar/jshint.json
164164
sonar.sii.quality.css.report.path=/reports/sonar/csslint.json
@@ -189,7 +189,7 @@ sonar.sii.duplication.scss.report.path=/reports/sonar/scss-duplication.xml
189189

190190
You can specify which files are analyzed for each language. You can change the values of the following properties in your sonar-project.properties:
191191

192-
```
192+
```ini
193193
# file suffixes with default values
194194
sonar.sii.js.suffixes=.js
195195
sonar.sii.html.suffixes=.html
@@ -202,15 +202,15 @@ sonar.sii.scss.suffixes=.scss
202202

203203
For indicating that reports are not found, the plugin logs a warning. This warning is useful when setting up your project to know if something is misconfigured. You can disable these logs using the following property in your sonar-project.properties:
204204

205-
```
205+
```ini
206206
sonar.sii.logs.report.missing.skip=true
207207
```
208208

209209
#### Do not fail if a source file is missing
210210

211211
By default, in order to keep coherence, the analysis done by the plugin will fail if the generated report has an entry on a file that doesn't exist. Even if it is not recommended, you can disable the failure by using the one of the following properties in your sonar-project.properties:
212212

213-
```
213+
```ini
214214
# set to false to disable missing source file while analyzing code quality
215215
sonar.sii.quality.js.file.missing.fail=false
216216
sonar.sii.quality.scss.file.missing.fail=false
@@ -240,7 +240,7 @@ By default, the plugin also store information about the file (number of lines, n
240240

241241
Sonar doesn't allow two plugins to store the same information. So if you are using another plugin that also store this information, the second plugin analysis will fail. By default our plugin doesn't override information stored by another plugin. But we can't force plugin execution order. So it may happen that our plugin is run before the other one. That's why we provide the way to explicitly tell our plugin to not store file information. To do this, use the following properties in your sonar-project.properties:
242242

243-
```
243+
```ini
244244
sonar.sii.quality.js.file.metrics.skip=true
245245
sonar.sii.quality.html.file.metrics.skip=true
246246
sonar.sii.quality.css.file.metrics.skip=true
@@ -251,7 +251,7 @@ sonar.sii.quality.eslint.angular.file.metrics.skip=true
251251
Sonar also provide CPD analysis. Like described above, code duplication analysis can fail if two plugins are doing it.
252252
You can either disable our analysis or disable Sonar CPD analysis:
253253

254-
```
254+
```ini
255255
# disable duplication analysis done by our plugin
256256
sonar.sii.duplication.js.skip=true
257257
sonar.sii.duplication.html.skip=true

0 commit comments

Comments
 (0)