GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Bump Ktlint to 1.7.1 by Goooler · Pull Request #2555 · diffplug/spotless

Conversation

@Goooler

@Goooler Goooler commented Jul 15, 2025

Copy link
Copy Markdown
Member

No description provided.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Goooler
Goooler commented Jul 15, 2025
View reviewed changes
Comment thread .github/renovate.json5 Resolved

Uh oh!

There was an error while loading. Please reload this page.

@Goooler
Goooler force-pushed the g/20250715/ktlint branch from 14bd6b4 to 17b151f Compare July 15, 2025 07:23
@Goooler

Goooler commented Jul 15, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

Strange! The test failed in the Maven plugin but the Gradle plugin

spotless/plugin-maven/src/test/java/com/diffplug/spotless/maven/kotlin/KtlintTest.java

Lines 79 to 92 in 3893580

@Test
void testWithCustomRuleSetApply() throws Exception {
writePomWithKotlinSteps("<ktlint>\n" +
" <customRuleSets>\n" +
" <value>io.nlopez.compose.rules:ktlint:0.4.16</value>\n" +
" </customRuleSets>\n" +
" <editorConfigOverride>\n" +
" <ktlint_function_naming_ignore_when_annotated_with>Composable</ktlint_function_naming_ignore_when_annotated_with>\n" +
" </editorConfigOverride>\n" +
"</ktlint>");
setFile("src/main/kotlin/Main.kt").toResource("kotlin/ktlint/listScreen.dirty");
ProcessRunner.Result result = mavenRunner().withArguments("spotless:check").runHasError();
Assertions.assertThat(result.toString()).contains("Composable functions that return Unit should start with an uppercase letter.");
}

java.lang.AssertionError: 
Expecting actual:
  "> arguments: [sh, -c, ./mvnw -e spotless:check]
exit code: 1
   stdout: (below)
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Spotless Maven Plugin Tests 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- spotless-maven-plugin:2.45.1-SNAPSHOT:check (default-cli) @ spotless-maven-plugin-tests ---
[INFO] Index file does not exist. Fallback to an empty index
[ERROR] Step 'ktlint' found problem in 'Main.kt':
com/pinterest/ktlint/rule/engine/core/api/Rule$OnlyWhenEnabledInEditorconfig
java.lang.NoClassDefFoundError: com/pinterest/ktlint/rule/engine/core/api/Rule$OnlyWhenEnabledInEditorconfig
  at java.base/java.lang.ClassLoader.defineClass1(Native Method)
  at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
  at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150)
  at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:524)
  at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:427)
  at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:421)
  at java.base/java.security.AccessController.doPrivileged(AccessController.java:712)
  at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:420)
  at com.diffplug.spotless.FeatureClassLoader.findClass(FeatureClassLoader.java:79)
  at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:592)
  at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
  at com.pinterest.ktlint.ruleset.standard.StandardRuleSetProvider.getRuleProviders$lambda$61(StandardRuleSetProvider.kt:171)
  at com.pinterest.ktlint.rule.engine.core.api.RuleProvider$Companion.invoke(RuleProvider.kt:41)
  at com.pinterest.ktlint.ruleset.standard.StandardRuleSetProvider.getRuleProviders(StandardRuleSetProvider.kt:171)
  at com.diffplug.spotless.glue.ktlint.compat.KtLintCompat1Dot0Dot0Adapter.lambda$format$0(KtLintCompat1Dot0Dot0Adapter.java:93)
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nedtwigg

nedtwigg commented Jul 16, 2025

Copy link
Copy Markdown
Member

I wonder if it's related to <customRuleSets> or io.nlopez.compose.rules:ktlint:0.4.16

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mrmans0n

mrmans0n commented Jul 16, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

My custom rules project (io.nlopez.compose.rules:ktlint) hasn't been updated yet to use kotlin 2.2 / latest versions of ktlint. You could use the snapshots of the latest version for now if you wanted to keep this one, or force an earlier ktlint version in the config, or go with a different project that's updated. Sorry about that (indirectly haha)

nedtwigg reacted with laugh emoji
All reactions
  • 😄 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Goooler

Goooler commented Jul 17, 2025

Copy link
Copy Markdown
Member Author

Good to know! I guessed this is related to ktlint/ktlint#3061.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Goooler
Goooler marked this pull request as draft July 21, 2025 00:38
@Goooler
Revert "Ignore Ktlint updates by Renovate"
a7c9e60
This reverts commit 34d92f2
@Goooler
Goooler force-pushed the g/20250715/ktlint branch from 17b151f to 816f879 Compare July 22, 2025 01:57
@Goooler Goooler changed the title Bump Ktlint to 1.7.0 Bump Ktlint to 1.7.1 Jul 22, 2025
Goooler added 2 commits July 22, 2025 10:17
@Goooler
Ktlint 1.7.1
34b2b97
@Goooler
Update io.nlopez.compose.rules:ktlint:0.4.25
af022dc
@Goooler
Goooler force-pushed the g/20250715/ktlint branch from 57eb676 to af022dc Compare July 22, 2025 02:17
@Goooler
Goooler marked this pull request as ready for review July 22, 2025 02:48
@Goooler
Goooler merged commit 1116e3b into main Jul 22, 2025
@Goooler
Goooler deleted the g/20250715/ktlint branch July 22, 2025 02:49
@Goooler Goooler mentioned this pull request Jul 22, 2025
Still ignore Ktlint updates by Renovate #2569
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@Goooler @nedtwigg @mrmans0n
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.