question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Changes in .editorconfig file are ignored on subsequent reruns

See original GitHub issue

After updating to ktlint 0.41.0 I get:

A failure occurred while executing org.jlleitschuh.gradle.ktlint.worker.KtLintWorkAction
   java.lang.RuntimeException: Unexpected imports layout: "*,java.**,javax.**,kotlin.**,^"

I know about the changes made regarding https://github.com/pinterest/ktlint/pull/1018 and tried different configurations in my .editorconfig. But non of these seems to work:

kotlin_imports_layout=idea ij_kotlin_imports_layout=* ij_kotlin_imports_layout=*,java.,javax.,kotlin.**,^

Not sure if this is an incompatibility with the plugin oder a general ktlint issue.

Plugin Version: 10.0.0 Ktlint Version: 0.41.0 Gradle Version: 6.8.3 Android Studio: 4.1.2

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7

github_iconTop GitHub Comments

3reactions
amatkivskiycommented, May 14, 2021

Thanks @Tapchicoma

⚠️ For anyone facing an issue that ktlint ignores any changes in .editorconfig -> run ./gradlew --stop and then rerun ktlint task.

⚠️⚠️⚠️ This should be mentioned somewhere in README.MD

3reactions
Tapchicomacommented, Apr 6, 2021

Just FYI: as workaround you have to stop Gradle daemon (so it will kill workers) after any .editorconfig changes.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Settings in .editorconfig are ignored or get overridden
I have specified any deviation from the default analyzer settings within a .editorconfig file which is located in the root of each of...
Read more >
EditorConfig settings - Visual Studio (Windows) - Microsoft Learn
Add a new file called .editorconfig to the project, with the following contents. The [*.cs] setting means that this change applies only to...
Read more >
Changelog and Migration Guide - Pre 1.0.0 - Detekt
All users who use the default config and override some properties in a second config file are encouraged to migrate. LongMethod and LargeClass...
Read more >
visual studio 2017 - .editorconfig not doing anything in VS2017?
I created a new project and added a .editorconfig file at my solution base folder. It's content is the following:
Read more >
Documentation | SpaceVim
Of course you can also use symlinks to change the location of this directory. SpaceVim also supports project specific configuration files. The init...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found