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

Cleanup after spotless update #513

Merged
merged 3 commits into from
Aug 11, 2022
Merged

Cleanup after spotless update #513

merged 3 commits into from
Aug 11, 2022

Conversation

yschimke
Copy link
Contributor

With the compose update we started getting this #507

> Could not create task ':app:spotlessKotlinCheck'.
   > Could not create task ':app:spotlessKotlin'.
      > KtLint versions < 0.46.0 not supported!

And pulling that thread we end up having to accept a bunch of new rules for ktlint, and spotless. This is an example fixing up a PR using ./gradlew spotlessApply and fixing up issues.

@yschimke yschimke requested a review from ataulm August 11, 2022 06:21
@@ -34,7 +34,7 @@ subprojects {
targetExclude("$buildDir/**/*.kt")
targetExclude("bin/**/*.kt")

ktlint(libs.versions.ktlint.get()).userData(["max_line_length" : "100"])
ktlint(libs.versions.ktlint.get())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this the syntax to override it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, not now results in https://github.com/android/wear-os-samples/runs/7776351662?check_suite_focus=true

UserData should not contain '.editorconfig' properties [max_line_length]. Such properties should be passed via the 'ExperimentalParams.editorConfigOverride' field. Note that this is only required for properties that (potentially) contain a value that differs from the actual value in the '.editorconfig' file.

@@ -63,7 +63,7 @@ fun ControlDashboard(
circle = circle,
mic = mic,
play = play,
music = music,
music = music
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

allow trailing comma was set to true for this sample, so how come it stripped it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can flip to false in .editorconfig so it's consistent. I'm about to go on holidays, so would like build green and passing and then forget about this :)

Or we can raise a bug, similar reports diffplug/spotless#1193 and it's defined here and one more place https://github.com/pinterest/ktlint/blob/d64733ba1711c592fb78fe04d3472c5294004450/ktlint-ruleset-standard/src/main/kotlin/com/pinterest/ktlint/ruleset/standard/TrailingCommaOnCallSiteRule.kt#L290

@yschimke
Copy link
Contributor Author

Landing since, the build is broken anyway.

@yschimke yschimke merged commit 6f2cb40 into android:main Aug 11, 2022
@yschimke yschimke deleted the cleanup branch October 28, 2022 23:53
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

Successfully merging this pull request may close these issues.

2 participants