Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucas3oo committed Aug 16, 2024
1 parent 89e01bb commit 747ac1d
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ If [the `java-test-fixtures` plugin](https://docs.gradle.org/current/userguide/j

Configure `Sonarlint` directly, to set task-specific properties.

Groovy syntax:
Groovy DSL:

```groovy
// Example to configure HTML report
sonarlintMain {
Expand All @@ -133,6 +134,7 @@ sonarlintMain {
}
}
```

```groovy
// Example to configure different rules etc for the test source
sonarlintTest {
Expand All @@ -141,15 +143,18 @@ sonarlintTest {
ignoreFailures = true
}
```

```groovy
// Exclude files from the scan (e.g. generated source code):
sonarlintMain {
exclude '**/org/example/some/package1/*'
exclude '**/org/example/some/package2/*'
}
```
Kotlin syntax:
```gradle.kts

Kotlin DSL:

```kotlinscript
tasks.sonarlintMain {
reports {
reports.create("html") {
Expand Down Expand Up @@ -223,7 +228,7 @@ and `org.sonarsource.kotlin:sonar-kotlin-plugin:2.20.0.4382` and any additionall

Typical `gradle.build.kts`:

```kotlin
```kotlinscript
plugins {
// Apply the org.jetbrains.kotlin.jvm Plugin to add support for Kotlin.
id("org.jetbrains.kotlin.jvm") version "1.7.21"
Expand Down

0 comments on commit 747ac1d

Please sign in to comment.