Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgraded ktlint.version from 0.50.0 to 1.0.0 #574

Merged
merged 1 commit into from
Oct 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading