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

Import order regression in 0.47 #1603

Closed
sanyarnd opened this issue Aug 23, 2022 · 9 comments
Closed

Import order regression in 0.47 #1603

sanyarnd opened this issue Aug 23, 2022 · 9 comments

Comments

@sanyarnd
Copy link

Sample code:

import java.time.Instant
import java.time.OffsetDateTime
import java.time.ZoneOffset
import java.time.format.DateTimeFormatterBuilder
import kotlin.random.Random
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.params.ParameterizedTest
import org.junit.jupiter.params.provider.Arguments
import org.junit.jupiter.params.provider.MethodSource

class Sample {
    companion object {
        private val formatter = DateTimeFormatterBuilder().appendInstant(3).toFormatter()

        @JvmStatic
        fun timestampString(): List<Arguments> = generateSequence {
            Arguments.of(generateTimeStampString())
        }.take(20).toList()

        private fun generateTimeStampString(): String? {
            return formatter.format(OffsetDateTime.now().minusDays(Random.nextLong(0, 10000)))
        }
    }

    @ParameterizedTest
    @MethodSource("timestampString")
    fun test(value: String) {
        val i = Instant.now()
        val z = ZoneOffset.UTC
        assertEquals(true, true)
    }
}

ktlint output:

Sample.kt:3:1: Imports must be ordered in lexicographic order without any empty lines in-between with "java", "javax", "kotlin" and aliases in the end

Reproducible both on Windows and Linux.

.editorconfig:

[{*.kt, *.kts}]
ij_kotlin_code_style_defaults = KOTLIN_OFFICIAL

ij_kotlin_imports_layout = *
ij_kotlin_packages_to_use_import_on_demand = ""
ij_kotlin_name_count_to_use_star_import = 999
ij_kotlin_name_count_to_use_star_import_for_members = 999

# ...

Nothing changed in the project except ktlint version.

@paul-dingemans
Copy link
Collaborator

I can not reproduce the problem with information above. What is the exact command you are running? Please also check of there are any other .editorconfig files on the path to your Sample class.

@sanyarnd
Copy link
Author

I have a multi-module maven project and I am running ktlint with maven plugin, goal - check.

https://github.com/gantsign/ktlint-maven-plugin/blob/main/src/main/kotlin/com/github/gantsign/maven/plugin/ktlint/CheckMojo.kt#L88

As you can see in sources, it just passes everything to ktlint itself without any pre-processing.

Here's a a reproducible: ktlint-bug.zip

Windows output:

~\git\ktlint-bug ❯ .\mvnw.cmd package                                                                                                                                                                               00:22:25
Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63)
Maven home: C:\Users\a.s.biryukov\.m2\wrapper\dists\apache-maven-3.8.6-bin\efe184d0\apache-maven-3.8.6
Java version: 18.0.2, vendor: Eclipse Adoptium, runtime: C:\Users\a.s.biryukov\.jdks\temurin-18.0.2
Default locale: en_US, platform encoding: UTF-8
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
21:25:34 [INFO] Error stacktraces are turned on.
21:25:34 [INFO] Scanning for projects...
21:25:34 [INFO]
21:25:34 [INFO] ---------------------------< bug:ktlint-bug >---------------------------
21:25:34 [INFO] Building ktlint-bug 1.0-SNAPSHOT
21:25:34 [INFO] --------------------------------[ jar ]---------------------------------
21:25:35 [INFO]
21:25:35 [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ ktlint-bug ---
21:25:35 [INFO] Using 'UTF-8' encoding to copy filtered resources.
21:25:35 [INFO] skip non existing resourceDirectory C:\Users\a.s.biryukov\git\ktlint-bug\src\main\resources
21:25:35 [INFO]
21:25:35 [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ ktlint-bug ---
21:25:37 [INFO] Nothing to compile - all classes are up to date
21:25:37 [INFO]
21:25:37 [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ ktlint-bug ---
21:25:37 [INFO] Using 'UTF-8' encoding to copy filtered resources.
21:25:37 [INFO] skip non existing resourceDirectory C:\Users\a.s.biryukov\git\ktlint-bug\src\test\resources
21:25:37 [INFO]
21:25:37 [INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ ktlint-bug ---
21:25:37 [INFO] Nothing to compile - all classes are up to date
21:25:37 [INFO]
21:25:37 [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ ktlint-bug ---
21:25:38 [INFO] No tests to run.
21:25:38 [INFO]
21:25:38 [INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ ktlint-bug ---
21:25:38 [WARNING] JAR will be empty - no content was marked for inclusion!
21:25:38 [INFO] Building jar: C:\Users\a.s.biryukov\git\ktlint-bug\target\ktlint-bug-1.0-SNAPSHOT.jar
21:25:38 [INFO]
21:25:38 [INFO] --- ktlint-maven-plugin:1.15.0:check (default) @ ktlint-bug ---
21:25:43 [ERROR] src\test\kotlin\Sample.kt:1:1: Imports must be ordered in lexicographic order without any empty lines in-between with "java", "javax", "kotlin" and aliases in the end
21:25:43 [INFO] ------------------------------------------------------------------------
21:25:43 [INFO] BUILD FAILURE
21:25:43 [INFO] ------------------------------------------------------------------------
21:25:43 [INFO] Total time:  8.412 s
21:25:43 [INFO] Finished at: 2022-08-23T21:25:43Z
21:25:43 [INFO] ------------------------------------------------------------------------
21:25:43 [ERROR] Failed to execute goal com.github.gantsign.maven:ktlint-maven-plugin:1.15.0:check (default) on project ktlint-bug: Kotlin source failed ktlint check. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.github.gantsign.maven:ktlint-maven-plugin:1.15.0:check (default) on project ktlint-bug: Kotlin source failed ktlint check.
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:375)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:351)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:171)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:163)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
    at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:104)
    at java.lang.reflect.Method.invoke (Method.java:577)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
    at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:104)
    at java.lang.reflect.Method.invoke (Method.java:577)
    at org.apache.maven.wrapper.BootstrapMainStarter.start (BootstrapMainStarter.java:53)
    at org.apache.maven.wrapper.WrapperExecutor.execute (WrapperExecutor.java:152)
    at org.apache.maven.wrapper.MavenWrapperMain.main (MavenWrapperMain.java:76)
Caused by: org.apache.maven.plugin.MojoFailureException: Kotlin source failed ktlint check.
    at com.github.gantsign.maven.plugin.ktlint.internal.Check.invoke (Check.kt:66)
    at com.github.gantsign.maven.plugin.ktlint.CheckMojo.execute (CheckMojo.kt:88)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:370)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:351)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:171)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:163)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
    at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:104)
    at java.lang.reflect.Method.invoke (Method.java:577)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
    at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:104)
    at java.lang.reflect.Method.invoke (Method.java:577)
    at org.apache.maven.wrapper.BootstrapMainStarter.start (BootstrapMainStarter.java:53)
    at org.apache.maven.wrapper.WrapperExecutor.execute (WrapperExecutor.java:152)
    at org.apache.maven.wrapper.MavenWrapperMain.main (MavenWrapperMain.java:76)
21:25:43 [ERROR]
21:25:43 [ERROR] Re-run Maven using the -X switch to enable full debug logging.
21:25:43 [ERROR]
21:25:43 [ERROR] For more information about the errors and possible solutions, please read the following articles:
21:25:43 [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

Ubuntu 22 output:

alex@NOTEBOOK-pyKgwK:/mnt/c/Users/a.s.biryukov/git/ktlint-bug$ ./mvnw package
Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63)
Maven home: /home/alex/.m2/wrapper/dists/apache-maven-3.8.6-bin/efe184d0/apache-maven-3.8.6
Java version: 17.0.4, vendor: Private Build, runtime: /usr/lib/jvm/java-17-openjdk-amd64
Default locale: en, platform encoding: UTF-8
OS name: "linux", version: "5.10.102.1-microsoft-standard-wsl2", arch: "amd64", family: "unix"
21:26:51 [INFO] Error stacktraces are turned on.
21:26:51 [INFO] Scanning for projects...
21:26:51 [INFO]
21:26:51 [INFO] ---------------------------< bug:ktlint-bug >---------------------------
21:26:51 [INFO] Building ktlint-bug 1.0-SNAPSHOT
21:26:51 [INFO] --------------------------------[ jar ]---------------------------------
21:26:59 [INFO]
21:26:59 [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ ktlint-bug ---
21:27:06 [INFO] Using 'UTF-8' encoding to copy filtered resources.
21:27:06 [INFO] skip non existing resourceDirectory /mnt/c/Users/a.s.biryukov/git/ktlint-bug/src/main/resources
21:27:06 [INFO]
21:27:06 [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ ktlint-bug ---
21:27:18 [INFO] Nothing to compile - all classes are up to date
21:27:18 [INFO]
21:27:18 [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ ktlint-bug ---
21:27:18 [INFO] Using 'UTF-8' encoding to copy filtered resources.
21:27:18 [INFO] skip non existing resourceDirectory /mnt/c/Users/a.s.biryukov/git/ktlint-bug/src/test/resources
21:27:18 [INFO]
21:27:18 [INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ ktlint-bug ---
21:27:18 [INFO] Nothing to compile - all classes are up to date
21:27:18 [INFO]
21:27:18 [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ ktlint-bug ---
21:27:21 [INFO] No tests to run.
21:27:21 [INFO]
21:27:21 [INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ ktlint-bug ---
21:27:23 [WARNING] JAR will be empty - no content was marked for inclusion!
21:27:23 [INFO]
21:27:23 [INFO] --- ktlint-maven-plugin:1.15.0:check (default) @ ktlint-bug ---
21:28:11 [ERROR] src/test/kotlin/Sample.kt:1:1: Imports must be ordered in lexicographic order without any empty lines in-between with "java", "javax", "kotlin" and aliases in the end
21:28:11 [INFO] ------------------------------------------------------------------------
21:28:11 [INFO] BUILD FAILURE
21:28:11 [INFO] ------------------------------------------------------------------------
21:28:11 [INFO] Total time:  01:19 min
21:28:11 [INFO] Finished at: 2022-08-23T21:28:11Z
21:28:11 [INFO] ------------------------------------------------------------------------
21:28:11 [ERROR] Failed to execute goal com.github.gantsign.maven:ktlint-maven-plugin:1.15.0:check (default) on project ktlint-bug: Kotlin source failed ktlint check. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.github.gantsign.maven:ktlint-maven-plugin:1.15.0:check (default) on project ktlint-bug: Kotlin source failed ktlint check.
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:375)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:351)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:171)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:163)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:568)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:568)
    at org.apache.maven.wrapper.BootstrapMainStarter.start (BootstrapMainStarter.java:53)
    at org.apache.maven.wrapper.WrapperExecutor.execute (WrapperExecutor.java:152)
    at org.apache.maven.wrapper.MavenWrapperMain.main (MavenWrapperMain.java:76)
Caused by: org.apache.maven.plugin.MojoFailureException: Kotlin source failed ktlint check.
    at com.github.gantsign.maven.plugin.ktlint.internal.Check.invoke (Check.kt:66)
    at com.github.gantsign.maven.plugin.ktlint.CheckMojo.execute (CheckMojo.kt:88)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:370)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:351)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:171)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:163)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:568)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:568)
    at org.apache.maven.wrapper.BootstrapMainStarter.start (BootstrapMainStarter.java:53)
    at org.apache.maven.wrapper.WrapperExecutor.execute (WrapperExecutor.java:152)
    at org.apache.maven.wrapper.MavenWrapperMain.main (MavenWrapperMain.java:76)
21:28:11 [ERROR]
21:28:11 [ERROR] Re-run Maven using the -X switch to enable full debug logging.
21:28:11 [ERROR]
21:28:11 [ERROR] For more information about the errors and possible solutions, please read the following articles:
21:28:11 [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

@paul-dingemans
Copy link
Collaborator

There are some known problems with this release for Windows users. In your original request you wrote that the problem also occurred on Linux. Would you mind double checking that?

@sanyarnd
Copy link
Author

sanyarnd commented Aug 24, 2022

There are outputs above are from Windows 10 and Ubuntu 22.
I also got the same error on the CI machine in the first place (Linux)

@paul-dingemans
Copy link
Collaborator

Tnx for the sample project. That project reproduces the problem for me.

I expect the problem to be caused by the way that the file name is passed to ktlint. https://github.com/gantsign/ktlint-maven-plugin/blob/main/src/main/kotlin/com/github/gantsign/maven/plugin/ktlint/internal/AbstractCheckSupport.kt#L191 makes the filename relative before sending it to ktlint. I expect that due to changes in ktlint 0.47 the .editorconfig in the root of the project can no longer be matched with this relative filename.

If you would comment out line below in .editorconfig then you will get the same error when executing KtLint from the commandline:

ij_kotlin_imports_layout = *

It would be cool, if you could test what happens in case you pass down the absolute path to the file instead of a relative file.

@sanyarnd
Copy link
Author

It would be cool, if you could test what happens in case you pass down the absolute path to the file instead of a relative file.

hm, I'm not sure what you mean, because I'm not passing anything :)
Do I need to download ktlint binaries myself and run it in CLI?

@paul-dingemans
Copy link
Collaborator

No, I meant it would be nice if you could change the ktlint-maven-plugin to pass the absolute path and test locally what would happen. But that was assuming that you were a contributor to that project, but I guess you are not.

@freemanjp
Copy link

Hi all, you can find the fix in the latest version of the ktlint-maven-plugin plugin:

<dependency>
  <groupId>com.github.gantsign.maven</groupId>
  <artifactId>ktlint-maven-plugin</artifactId>
  <version>1.15.1</version>
</dependency>

@paul-dingemans
Copy link
Collaborator

Fixed in ktlint-maven-plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants