Skip to content

Commit

Permalink
Add support for Sarif reporter (#222)
Browse files Browse the repository at this point in the history
* Add support for Sarif reporter

And bump release.
A little introspection required to make sure relative paths are maintained across reporters.

* Fix windows paths in test
  • Loading branch information
jeremymailen authored Sep 4, 2021
1 parent 2bf8c79 commit 378ae54
Show file tree
Hide file tree
Showing 8 changed files with 220 additions and 119 deletions.
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Available on the Gradle Plugins Portal: https://plugins.gradle.org/plugin/org.jm

```kotlin
plugins {
id("org.jmailen.kotlinter") version "3.5.1"
id("org.jmailen.kotlinter") version "3.6.0"
}
```

Expand All @@ -30,7 +30,7 @@ plugins {

```groovy
plugins {
id "org.jmailen.kotlinter" version "3.5.1"
id "org.jmailen.kotlinter" version "3.6.0"
}
```

Expand All @@ -50,7 +50,7 @@ buildscript {
}
}
dependencies {
classpath("org.jmailen.gradle:kotlinter-gradle:3.5.1")
classpath("org.jmailen.gradle:kotlinter-gradle:3.6.0")
}
}
```
Expand All @@ -75,7 +75,7 @@ buildscript {
}
}
dependencies {
classpath "org.jmailen.gradle:kotlinter-gradle:3.5.1"
classpath "org.jmailen.gradle:kotlinter-gradle:3.6.0"
}
}
```
Expand Down Expand Up @@ -184,7 +184,7 @@ kotlinter {

</details>

Options for `reporters`: `checkstyle`, `html`, `json`, `plain`
Options for `reporters`: `checkstyle`, `html`, `json`, `plain`, `sarif`

Reporters behave as described at: https://github.com/pinterest/ktlint

Expand Down Expand Up @@ -330,7 +330,8 @@ buildscript {
"com.pinterest.ktlint:ktlint-reporter-checkstyle:0.39.0",
"com.pinterest.ktlint:ktlint-reporter-json:0.39.0",
"com.pinterest.ktlint:ktlint-reporter-html:0.39.0",
"com.pinterest.ktlint:ktlint-reporter-plain:0.39.0",
"com.pinterest.ktlint:ktlint-reporter-plain:0.39.0",
"com.pinterest.ktlint:ktlint-reporter-sarif:0.39.0",
"com.pinterest.ktlint:ktlint-ruleset-experimental:0.39.0",
"com.pinterest.ktlint:ktlint-ruleset-standard:0.39.0"
)
Expand Down
7 changes: 4 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
id("com.gradle.plugin-publish") version "0.15.0"
`java-gradle-plugin`
`maven-publish`
id("org.jmailen.kotlinter") version "3.4.5"
id("org.jmailen.kotlinter") version "3.5.1"
idea
}

Expand All @@ -19,7 +19,7 @@ val githubUrl = "https://github.com/jeremymailen/kotlinter-gradle"
val webUrl = "https://github.com/jeremymailen/kotlinter-gradle"
val projectDescription = "Lint and formatting for Kotlin using ktlint with configuration-free setup on JVM and Android projects"

version = "3.5.1"
version = "3.6.0"
group = "org.jmailen.gradle"
description = projectDescription

Expand All @@ -41,6 +41,7 @@ dependencies {
"ktlint-reporter-json",
"ktlint-reporter-html",
"ktlint-reporter-plain",
"ktlint-reporter-sarif",
"ktlint-ruleset-experimental",
"ktlint-ruleset-standard"
).forEach { module ->
Expand Down Expand Up @@ -84,7 +85,7 @@ tasks {
}

wrapper {
gradleVersion = "7.1.1"
gradleVersion = "7.2"
}
}

Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 378ae54

Please sign in to comment.