Skip to content

Commit

Permalink
Upgraded ktlint.version from 0.50.0 to 1.0.0 (#574)
Browse files Browse the repository at this point in the history
Bumps `ktlint.version` from 0.50.0 to 1.0.0.
  • Loading branch information
freemanjp committed Oct 1, 2023
1 parent d9e7474 commit 9818f1b
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 23 deletions.
3 changes: 0 additions & 3 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 14 additions & 14 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@
<jacoco-maven-plugin.version>0.8.7</jacoco-maven-plugin.version>
<java.require.version>11</java.require.version>
<jdeps.multiRelease>11</jdeps.multiRelease>
<kotlin.version>1.8.22</kotlin.version>
<ktlint.version>0.50.0</ktlint.version>
<kotlin.version>1.9.10</kotlin.version>
<ktlint.version>1.0.0</ktlint.version>
<license-maven-plugin.version>1.20</license-maven-plugin.version>
<maven-plugin-plugin.version>3.6.4</maven-plugin-plugin.version>
<maven.compiler.release>8</maven.compiler.release>
Expand Down Expand Up @@ -82,32 +82,32 @@
</dependency>
<dependency>
<groupId>com.pinterest.ktlint</groupId>
<artifactId>ktlint-cli-reporter</artifactId>
<artifactId>ktlint-cli-reporter-baseline</artifactId>
<version>${ktlint.version}</version>
</dependency>
<dependency>
<groupId>com.pinterest.ktlint</groupId>
<artifactId>ktlint-cli-ruleset-core</artifactId>
<artifactId>ktlint-cli-reporter-checkstyle</artifactId>
<version>${ktlint.version}</version>
</dependency>
<dependency>
<groupId>com.pinterest.ktlint</groupId>
<artifactId>ktlint-reporter-baseline</artifactId>
<artifactId>ktlint-cli-reporter-core</artifactId>
<version>${ktlint.version}</version>
</dependency>
<dependency>
<groupId>com.pinterest.ktlint</groupId>
<artifactId>ktlint-reporter-checkstyle</artifactId>
<artifactId>ktlint-cli-reporter-json</artifactId>
<version>${ktlint.version}</version>
</dependency>
<dependency>
<groupId>com.pinterest.ktlint</groupId>
<artifactId>ktlint-reporter-json</artifactId>
<artifactId>ktlint-cli-reporter-plain</artifactId>
<version>${ktlint.version}</version>
</dependency>
<dependency>
<groupId>com.pinterest.ktlint</groupId>
<artifactId>ktlint-reporter-plain</artifactId>
<artifactId>ktlint-cli-ruleset-core</artifactId>
<version>${ktlint.version}</version>
</dependency>
<dependency>
Expand Down Expand Up @@ -311,15 +311,15 @@
</dependency>
<dependency>
<groupId>com.pinterest.ktlint</groupId>
<artifactId>ktlint-cli-reporter</artifactId>
<artifactId>ktlint-cli-reporter-core</artifactId>
</dependency>
<dependency>
<groupId>com.pinterest.ktlint</groupId>
<artifactId>ktlint-cli-ruleset-core</artifactId>
<artifactId>ktlint-cli-reporter-plain</artifactId>
</dependency>
<dependency>
<groupId>com.pinterest.ktlint</groupId>
<artifactId>ktlint-reporter-plain</artifactId>
<artifactId>ktlint-cli-ruleset-core</artifactId>
</dependency>
<dependency>
<groupId>com.pinterest.ktlint</groupId>
Expand Down Expand Up @@ -416,17 +416,17 @@
</dependency>
<dependency>
<groupId>com.pinterest.ktlint</groupId>
<artifactId>ktlint-reporter-baseline</artifactId>
<artifactId>ktlint-cli-reporter-baseline</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.pinterest.ktlint</groupId>
<artifactId>ktlint-reporter-checkstyle</artifactId>
<artifactId>ktlint-cli-reporter-checkstyle</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.pinterest.ktlint</groupId>
<artifactId>ktlint-reporter-json</artifactId>
<artifactId>ktlint-cli-reporter-json</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ class MavenLogReporter(
private val acc = ConcurrentHashMap<String, MutableList<KtlintCliError>>()

override fun onLintError(file: String, ktlintCliError: KtlintCliError) {
val (line, col, ruleId, detail) = ktlintCliError
val line = ktlintCliError.line
val col = ktlintCliError.col
val ruleId = ktlintCliError.ruleId
val detail = ktlintCliError.detail

if (groupByFile) {
acc.getOrPut<String?, MutableList<KtlintCliError>?>(file, ::ArrayList)!!.add(ktlintCliError)
Expand Down Expand Up @@ -70,7 +73,11 @@ class MavenLogReporter(

log.error(MessageUtils.buffer().a(file.dir()).strong(file.name()).toString())

for ((line, col, ruleId, detail) in errList) {
for (err in errList) {
val line = err.line
val col = err.col
val ruleId = err.ruleId
val detail = err.detail
val buf = MessageUtils.buffer()
.a(" ")
.strong(line)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ internal abstract class AbstractCheckSupport(
editorConfigDefaults = editorConfigDefaults,
editorConfigOverride = editorConfigOverride,
isInvokedFromCli = false,
enableKotlinCompilerExtensionPoint = true,
)

var hasErrors = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ internal class Format(
editorConfigDefaults = editorConfigDefaults,
editorConfigOverride = editorConfigOverride,
isInvokedFromCli = false,
enableKotlinCompilerExtensionPoint = true,
)

val checkedFiles = mutableSetOf<File>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* THE SOFTWARE.
* #L%
*/
@file:Suppress("ktlint:filename")
@file:Suppress("ktlint:standard:filename")

package com.github.gantsign.maven.plugin.ktlint.internal

Expand Down

0 comments on commit 9818f1b

Please sign in to comment.