Releases: slackhq/compose-lints
1.4.2
- Enhancement: Better handle name shadowing in
SlotReused
lint and reduce false positives. - Test against lint
31.8.0-alpha07
. - Various doc fixes.
- Build against lint
31.7.1
. - Build against Kotlin
2.0.21
. Still targeting Kotlin 1.9 language version (lint 31.7.x's language version).
Special thanks to @SimonMarquis and @alexvanyo for contributing to this release!
What's Changed
- Fix missing newline breaking mkdocs list formatting by @SimonMarquis in #429
- Update dependency MarkupSafe to v3 by @slack-oss-bot in #426
- Update dependency termcolor to v2.5.0 by @slack-oss-bot in #425
- Update lint.latest to v31.8.0-alpha05 by @slack-oss-bot in #422
- Fix missing indentation breaking the mkdocs admonition formatting by @SimonMarquis in #428
- Update plugin mavenPublish to v0.30.0 by @slack-oss-bot in #435
- Update dependency com.android.tools.lint:lint-api to v31.7.1 by @slack-oss-bot in #436
- Update dependency org.jetbrains.kotlin.jvm to v2.0.21 by @slack-oss-bot in #432
- Update plugin ksp to v2.0.21-1.0.25 by @slack-oss-bot in #433
- Update plugin lint to v8.7.1 by @slack-oss-bot in #438
- Update plugin spotless to v7.0.0.BETA3 by @slack-oss-bot in #439
- Update dependency MarkupSafe to v3.0.2 by @slack-oss-bot in #440
- Update dependency mkdocs-macros-plugin to v1.3.6 by @slack-oss-bot in #430
- Update lint.latest to v31.8.0-alpha07 by @slack-oss-bot in #437
- Update dependency mkdocs-material to v9.5.42 by @slack-oss-bot in #431
- Improve SlotReusedDetector by @alexvanyo in #441
New Contributors
- @SimonMarquis made their first contribution in #429
Full Changelog: 1.4.1...1.4.2
1.4.1
- Fix: Fix false positives reported by
ComposeContentEmitterReturningValues
. - Fix: Fix
content-emitters
configuration in docs. - Fix: Fix link to multipreview annotations in docs.
Special thanks to @erikghonyan for contributing to this release!
What's Changed
- Fix link to multipreview annotations in docs by @erikghonyan in #418
- Fix false positives for
ComposeContentEmitterReturningValues
by @ZacSweers in #420
New Contributors
- @erikghonyan made their first contribution in #418
Full Changelog: 1.4.0...1.4.1
1.4.0
- New: Implement
SlotReused
lint. See https://slackhq.github.io/compose-lints/rules/#do-not-invoke-slots-in-more-than-once-place for more information. - Enhancement: Report the function name for readability in
ComposeContentEmitterReturningValues
. - Enhancement: Check for inherited
@Preview
annotations up to four levels. - Enhancement: Allow
@VisibleForTesting
/@TestOnly
-annotated preview composables to be public. - Fix: Don't report duplicate errors about multiple content emitters.
- Fix: Normalize lint option loading to match with individual issues.
- Fix: Use name of parameter if text is not available.
- Removed: Delete obsolete
ComposeComposableModifier
lint check. - Various docs fixes.
- Build against Lint
8.7.0
. - Update
api
andminApi
to16
(i.e. lint 8.7.0+). It's possible this may work with API 15 but we have not tested it. - Test against Lint
8.8.0-alpha04
. - Test against K2 UAST.
- Build against Kotlin
2.0.20
.
Special thanks to @alexvanyo, @seve-andre, @svenjacobs, @ychescale9, @shahzadansari, @kozaxinan, for contributing to this release!
What's Changed
- Update gradle/wrapper-validation-action action to v2 by @slack-oss-bot in #259
- Update dependency mkdocs-material to v9.5.6 by @slack-oss-bot in #258
- Update plugin detekt to v1.23.5 by @slack-oss-bot in #261
- Update lint-latest to v31.4.0-alpha07 by @slack-oss-bot in #256
- Update dependency mkdocs-material to v9.5.7 by @slack-oss-bot in #263
- Update dependency MarkupSafe to v2.1.5 by @slack-oss-bot in #262
- Update plugin lint to v8.4.0-alpha07 + Gradle 8.6 by @slack-oss-bot in #247
- Update gradle/gradle-build-action action to v3 by @slack-oss-bot in #257
- Update plugin lint to v8.4.0-alpha07 by @slack-oss-bot in #265
- Update plugin lint to v8.4.0-alpha08 by @slack-oss-bot in #270
- Update lint-latest to v31.4.0-alpha08 by @slack-oss-bot in #269
- Update dependency mkdocs-material to v9.5.8 by @slack-oss-bot in #272
- Use name of parameter if text is not available by @kozaxinan in #274
- Update lint-latest to v31.4.0-alpha09 by @slack-oss-bot in #275
- Update plugin lint to v8.4.0-alpha09 by @slack-oss-bot in #276
- Update dependency mkdocs-material to v9.5.9 by @slack-oss-bot in #277
- Update lint-latest to v31.4.0-alpha10 by @slack-oss-bot in #278
- Update plugin lint to v8.4.0-alpha10 by @slack-oss-bot in #279
- Update dependency mkdocs-material to v9.5.10 by @slack-oss-bot in #280
- Update dependency future to v1 by @slack-oss-bot in #283
- Update plugin lint to v8.4.0-alpha12 by @slack-oss-bot in #285
- Update dependency mkdocs-material to v9.5.12 by @slack-oss-bot in #286
- Update plugin ksp to v1.9.22-1.0.18 by @slack-oss-bot in #287
- Update dependency com.android.tools.lint:lint-api to v31.3.0 by @slack-oss-bot in #288
- Update dependency python-dateutil to v2.9.0 by @slack-oss-bot in #289
- Update lint-latest to v31.4.0-alpha12 by @slack-oss-bot in #284
- Update dependency python-dateutil to v2.9.0.post0 by @slack-oss-bot in #290
- Update plugin dokka to v1.9.20 by @slack-oss-bot in #294
- Update dependency pymdown-extensions to v10.7.1 by @slack-oss-bot in #293
- Update dependency mkdocs-material to v9.5.13 by @slack-oss-bot in #295
- Update dependency org.jetbrains.kotlin.jvm to v1.9.23 by @slack-oss-bot in #296
- Update lint-latest to v31.4.0-alpha13 by @slack-oss-bot in #297
- Update plugin ksp to v1.9.23-1.0.19 by @slack-oss-bot in #298
- Update lint config by @ZacSweers in #300
- Fix broken reference link in Modifier rules section by @shahzadansari in #304
- Remove broken link to Modifier.composed{ } by @shahzadansari in #306
- Update plugin lint to v8.4.0-alpha13 by @slack-oss-bot in #301
- Update plugin mavenPublish to v0.28.0 by @slack-oss-bot in #302
- Update dependency Markdown to v3.6 by @slack-oss-bot in #305
- Update dependency mkdocs-material to v9.5.14 by @slack-oss-bot in #307
- Update dependency com.android.tools.lint:lint-api to v31.3.1 by @slack-oss-bot in #308
- Update lint-latest to v31.4.0-beta01 by @slack-oss-bot in #309
- Update plugin lint to v8.4.0-beta01 by @slack-oss-bot in #310
- Update dependency mkdocs-material to v9.5.15 by @slack-oss-bot in #311
- Update dependency gradle to v8.7 by @slack-oss-bot in #312
- Update plugin detekt to v1.23.6 by @slack-oss-bot in #313
- Update dependency mkdocs-material to v9.5.17 by @slack-oss-bot in #314
- Update plugin lint to v8.5.0-alpha04 by @slack-oss-bot in #317
- Update peaceiris/actions-gh-pages action to v4 by @slack-oss-bot in #319
- Update dependency com.android.tools.lint:lint-api to v31.3.2 by @slack-oss-bot in #320
- Update plugin ksp to v1.9.23-1.0.20 by @slack-oss-bot in #318
- Update lint-latest to v31.5.0-alpha04 by @slack-oss-bot in #316
- Update dependency pymdown-extensions to v10.8.1 by @slack-oss-bot in #327
- Update dependency com.facebook:ktfmt to v0.49 by @slack-oss-bot in #331
- Update dependency mkdocs-material to v9.5.19 by @slack-oss-bot in #325
- Update plugin lint to v8.5.0-alpha06 by @slack-oss-bot in #322
- Update lint-latest to v31.5.0-alpha07 by @slack-oss-bot in #321
- Update dependency mkdocs to v1.6.0 by @slack-oss-bot in #329
- Update gradle/wrapper-validation-action action to v3 by @slack-oss-bot in #324
- Update dependency com.android.tools.lint:lint-api to v31.4.0 by @slack-oss-bot in #333
- Update dependency Jinja2 to v3.1.4 by @slack-oss-bot in #337
- Update dependency Pygments to v2.18.0 by @slack-oss-bot in #336
- Update dependency mkdocs-material to v9.5.22 by @slack-oss-bot in #332
- Update plugin lint to v8.5.0-beta01 by @slack-oss-bot in #335
- Update lint-latest to v31.5.0-beta01 by @slack-oss-bot in #334
- Update dependency org.jetbrains.kotlin.jvm to v1.9.24 by @slack-oss-bot in #338
- Update dependency mkdocs-material to v9.5.24 by @slack-oss-bot in #341
- Update dependency com.android.tools.lint:lint-api to v31.4.1 by @slack-oss-bot in #345
- Update plugin lint to v8.6.0-alpha02 by @slack-oss-bot in #343
- Update lint-latest to v31.6.0-alpha02 by @slack-oss-bot in #342
- Update to K2 by @ZacSweers in #264
- Update lint-latest to v31.6.0-alpha04 by @slack-oss-bot in #348
- Update plugin lint to v8.6.0-alpha04 by @slack-oss-bot in #349
- Update dependency gradle to v8.8 by @slack-oss-bot in #353
- Update plugin ksp to v2.0.0-1.0.22 by @slack-oss-bot in #354
- Update dependency mkdocs-material to v9.5.26 by @slack-oss-bot in #352
- Update dependency tornado to v6.4.1 by @slack-oss-bot in https://github.c...
1.3.1
- Lower the lint API back to
14
, not15
.
Full Changelog: 1.3.0...1.3.1
1.3.0
- New: Implement
ModifierComposed
check to lint against use ofModifier.composed
, which is no longer recommended in favor of the newModifier.Node
API. - New: Implement
ComposeUnstableReceiver
check to warn when composable extension functions or composables instance functions have unstable receivers/containing classes. - New: Check for property accessors with composition locals.
- Enhancement: The
ComposeComposableModifier
message now recommends the newModifier.Node
API. - Enhancement: Make lints significantly more robust to edge cases like typealiases, import aliases, parentheses, fully-qualified references, and whitespace. Our tests now cover all these cases.
- Enhancement: Update
@Preview
detection to also detect Compose Desktop's own@Preview
annotation. - Enhancement: Improve the
ComposeParameterOrder
check to only lint the parameter list and add a quickfix. - Enhancement: Add support for checking for loops in multiple content emitters.
- Fix: Fix allowed names config for Unit-returning functions.
- Fix: Ignore context receivers in multiple content emissions lint.
- Fix: Allow nullable types for trailing lambdas in
ComposeParameterOrder
. - Fix: Best-effort work around name mangling when comparing name in M2ApiDetector's allow list.
- Fix: Fix
ComposePreviewPublic
to always just require private, remove preview parameter configuration. - Docs: Improve docs for
ComposeContentEmitterReturningValues
- Build against lint-api
31.2.2
. - Test against lint-api
31.4.0-alpha06
. - Raise Kotlin apiVersion/languageVersion to
1.9.0
.
Special thanks to @jzbrooks, @joeMalebe, and @dellisd for contributing to this release!
What's Changed
- Update dependency Pygments to v2.15.1 by @slack-oss-bot in #108
- Update dependency tornado to v6.3.1 by @slack-oss-bot in #111
- Update dependency gradle to v8.1.1 by @slack-oss-bot in #110
- Update dependency mkdocs-material to v9.1.7 by @slack-oss-bot in #112
- Update dependency termcolor to v2.3.0 by @slack-oss-bot in #113
- Update dependency mkdocs-material to v9.1.8 by @slack-oss-bot in #114
- Update plugin ksp to v1.8.21-1.0.11 by @slack-oss-bot in #115
- Update lint-latest to v31.2.x alphas by @slack-oss-bot in #109
- Update dependency com.facebook:ktfmt to v0.44 by @slack-oss-bot in #116
- Update dependency mkdocs to v1.4.3 by @slack-oss-bot in #119
- Update dependency mkdocs-material to v9.1.9 by @slack-oss-bot in #120
- Update dependency com.google.auto.service:auto-service-annotations to v1.1.0 by @slack-oss-bot in #126
- Update plugin detekt to v1.23.0 by @slack-oss-bot in #127
- Update plugin spotless to v6.19.0 by @slack-oss-bot in #128
- Update dependency mkdocs-macros-plugin to v1 by @slack-oss-bot in #130
- Update dependency MarkupSafe to v2.1.3 by @slack-oss-bot in #131
- Update plugin dokka to v1.8.20 by @slack-oss-bot in #132
- Update dependency pymdown-extensions to v10 by @slack-oss-bot in #124
- Update dependency com.android.tools.lint:lint-api to v31.0.2 by @slack-oss-bot in #117
- Update dependency mkdocs-material to v9.1.15 by @slack-oss-bot in #122
- Update plugin lint to v8.0.2 by @slack-oss-bot in #118
- Update dependency tornado to v6.3.2 by @slack-oss-bot in #123
- Allow nullable types for trailing lambdas in ComposeParameterOrder by @mrmans0n in #134
- Ignore context receivers in multiple content emissions lint by @mrmans0n in #135
- Update dependency com.google.auto.service:auto-service-annotations to v1.1.1 by @slack-oss-bot in #136
- Fix allowed names for Unit-returning functions by @dellisd in #139
- Update plugin ksp to v1.8.22-1.0.11 by @slack-oss-bot in #133
- Update lint-latest to v31.2.0-alpha09 by @slack-oss-bot in #121
- Update dependency mkdocs-material to v9.1.17 by @slack-oss-bot in #138
- Update lint-latest to v31.2.0-alpha10 by @slack-oss-bot in #140
- Update dependency click to v8.1.4 by @slack-oss-bot in #144
- Update dependency mkdocs-material to v9.1.18 by @slack-oss-bot in #143
- Update lint-latest to v31.2.0-alpha11 by @slack-oss-bot in #145
- Update dependency gradle to v8.2 by @slack-oss-bot in #141
- Update plugin mavenPublish to v0.25.3 by @slack-oss-bot in #142
- Update dependency dev.zacsweers.autoservice:auto-service-ksp to v1.1.0 by @slack-oss-bot in #147
- Update lint-latest to v31.2.0-alpha12 by @slack-oss-bot in #150
- Update dependency mkdocs-macros-plugin to v1.0.2 by @slack-oss-bot in #151
- Update dependency gradle to v8.2.1 by @slack-oss-bot in #149
- Update dependency PyYAML to v6.0.1 by @slack-oss-bot in #154
- Update plugin spotless to v6.20.0 by @slack-oss-bot in #155
- Update dependency mkdocs-material to v9.1.19 by @slack-oss-bot in #156
- Update lint-latest to v31.2.0-alpha13 by @slack-oss-bot in #157
- Slight Improvement for rules documentation by @joeMalebe in #170
- Update dependency click to v8.1.7 by @slack-oss-bot in #152
- Update dependency pymdown-extensions to v10.3 by @slack-oss-bot in #153
- Update dependency Markdown to v3.4.4 by @slack-oss-bot in #158
- Update dependency mkdocs-material to v9.4.2 by @slack-oss-bot in #160
- Update dependency com.android.tools.lint:lint-api to v31.1.1 by @slack-oss-bot in #161
- Update dependency mkdocs to v1.5.3 by @slack-oss-bot in #162
- Update plugin lint to v8.1.1 by @slack-oss-bot in #163
- Update plugin detekt to v1.23.1 by @slack-oss-bot in #164
- Kotlin 1.9.10 + gradle 8.3 and a couple other things by @slack-oss-bot in #146
- Update dependency com.android.tools.lint:lint-api to v31.1.2 by @slack-oss-bot in #174
- Update dependency mkdocs-macros-plugin to v1.0.4 by @slack-oss-bot in #175
- Update lint-latest to v31.3.0-alpha06 + fix baselined issues by @slack-oss-bot in #159
- Update actions/checkout action to v4 by @slack-oss-bot in #181
- Update dependency tornado to v6.3.3 by @slack-oss-bot in #176
- Update dependency lunr to v0.7.0.post1 by @slack-oss-bot in #178
- Update dependency mkdocs-material-extensions to v1.2 by @slack-oss-bot in #179
- Update plugin spotless to v6.22.0 by @slack-oss-bot in #180
- Update dependency Pygments to v2.16.1 by @slack-oss-bot in #177
- Update lint-latest to v31.3.0-alpha12 by @slack-oss-bot in #184
- Update dependency Markdown to v3.5.1 by @slack-oss-bot in #185
- Update plugin dokka to v1.9.10 by @slack-oss-bot in #186
- Update dependency org.jetbrains.kotlin.jvm to v1.9.20 by @slack-oss-bot in #190
- Update dependency mkdocs-material to v9.4.7 by @slack-oss-bot in #182
- Update dependency gradle to v8.4 by @slack-oss-bot in #183
- Update dependency pymdown-extensions to v10.3.1 by @slack-oss-bot in #188
- Update plugin detekt to v1.23.3 by @slack-oss-bot in #191
- Update dependency mkdocs-material-extensions to v1.3 by @slack-oss-bot in https:...
1.2.0
- Fix: Only run
ComposeM2Api
checks on Kotlin files. - Update lint current and min API to 14, aka AGP 8.0.0+.
What's Changed
- Update plugin spotless to v6.17.0 by @slack-oss-bot in #83
- Add visibility-threshold to ComposeModifierMissing rule by @mrmans0n in #86
- Update dependency mkdocs-material to v9.1.3 by @slack-oss-bot in #82
- Update lint-latest to v31.1.0-alpha09 by @slack-oss-bot in #85
- Update lint-latest to v31.1.0-alpha10 by @slack-oss-bot in #88
- Update plugin mavenPublish to v0.25.1 by @slack-oss-bot in #90
- Update dependency Markdown to v3.4.3 by @slack-oss-bot in #33
- Update dependency mkdocs-material to v9.1.4 by @slack-oss-bot in #92
- Update lint-latest to v31.1.0-alpha11 by @slack-oss-bot in #93
- Update dependency mkdocs-material to v9.1.5 by @slack-oss-bot in #94
- Update dependency com.android.tools.lint:lint-api to v31 by @slack-oss-bot in #101
- Update plugin lint to v8 by @slack-oss-bot in #102
- Update plugin mavenPublish to v0.25.2 by @slack-oss-bot in #103
- Update dependency mkdocs-material to v9.1.6 by @slack-oss-bot in #97
- Update dependency pymdown-extensions to v9.11 by @slack-oss-bot in #98
- Update dependency gradle to v8.1 by @slack-oss-bot in #100
- Update plugin spotless to v6.18.0 by @slack-oss-bot in #96
- Update dependency Pygments to v2.15.0 by @slack-oss-bot in #99
- Update dependency tornado to v6.3 by @slack-oss-bot in #105
- Update plugin ksp to v1.8.20-1.0.11 by @slack-oss-bot in #104
- Only run the M2ApiDetector on Kotlin files by @ZacSweers in #107
Full Changelog: 1.1.1...1.2.0
1.1.1
- Fix: Use
setEnabledByDefault(false)
instead ofIGNORE
inComposeM2Api
. This is what we intended before, too, but didn't realize there was a dedicated API for it. Note that this changes configuration slightly as you must now explicitly enable the rule too and not just the severity. See the docs: https://slackhq.github.io/compose-lints/rules/#use-material-3.
What's Changed
- Small rule tweaks to m3 by @ZacSweers in #79
- Use setEnableByDefault instead for M2ApiDetector by @ZacSweers in #81
Full Changelog: 1.1.0...1.1.1
1.1.0
- New: Add
ComposeM2Api
rule. This rule can be used to lint against using "Material 2" (androidx.compose.material
) APIs in codebases that have migrated to Material 3 (M3). This rule is disabled by default, see the docs for more information: https://slackhq.github.io/compose-lints/rules/#use-material-3. - Enhancement: Add
viewmodel-factories
lint option toComposeViewModelInjection
. This allows you to define your own known ViewModel factories. Thanks to @WhosNickDoglio for contributing this! - Build against lint-api to
30.4.2
. - Test against lint
31.1.0-alpha08
.
What's Changed
- v1.0.1 by @chrisbanes in #59
- Update ViewModelInjectionDetector to support a lint option by @WhosNickDoglio in #53
- Update lint-latest to v31.1.0-alpha05 by @slack-oss-bot in #61
- Update dependency gradle to v8.0.1 by @slack-oss-bot in #63
- Update lint-latest to v31.1.0-alpha06 by @slack-oss-bot in #65
- Fix CompositionLocals docs Markdown link by @vitusortner in #62
- Update dependency mkdocs-material to v9.0.14 by @slack-oss-bot in #64
- Update plugin lint to v7.4.2 by @slack-oss-bot in #69
- Update dependency mkdocs-material to v9.0.15 by @slack-oss-bot in #66
- Update dependency com.android.tools.lint:lint-api to v30.4.2 by @slack-oss-bot in #67
- Update plugin spotless to v6.16.0 by @slack-oss-bot in #70
- Update lint-latest to v31.1.0-alpha07 by @slack-oss-bot in #68
- Update dependency gradle to v8.0.2 by @slack-oss-bot in #73
- Update dependency mkdocs-material to v9.1.0 by @slack-oss-bot in #72
- Update plugin dokka to v1.8.10 by @slack-oss-bot in #74
- Update lint-latest to v31.1.0-alpha08 by @slack-oss-bot in #78
- Update dependency pymdown-extensions to v9.10 by @slack-oss-bot in #77
- Update dependency mkdocs-material to v9.1.1 by @slack-oss-bot in #76
- Implement M2ApiDetector by @ZacSweers in #75
New Contributors
- @vitusortner made their first contribution in #62
Full Changelog: 1.0.1...1.1.0
1.0.1
Changes
- Add installation instructions to index.md by @ZacSweers in #44
- Fix possible typo in README by @WhosNickDoglio in #45
- Hopefully fix publish-docs actions by @chrisbanes in #47
- Update lint-latest to v31.1.0-alpha04 by @slack-oss-bot in #51
- Update dependency mkdocs-material to v9.0.12 by @slack-oss-bot in #50
- Downgrade ComposeCompositionLocalUsage to warning by @chrisbanes in #52
- Misc mutable parameter fixes by @ZacSweers in #49
- Update plugin spotless to v6.15.0 by @slack-oss-bot in #54
- Update dependency gradle to v8 by @slack-oss-bot in #55
- Update Lint baseline by @chrisbanes in #58
New Contributors
- @WhosNickDoglio made their first contribution in #45
Full Changelog: 1.0.0...1.0.1
1.0.0
Initial release!
This is a near-full port of the original rule set to lint. It should be mostly at parity with the original rules as well.
The lints target lint-api 30.4.0
/lint API 13
and target Java 11.
See the docs for full usage and information: https://slackhq.github.io/compose-lints.
Notes
ComposeViewModelInjection
does not offer a quickfix yet. PRs welcome!ComposeUnstableCollections
is a warning by default rather than an error.CompositionLocalNaming
is not ported because this is offered in compose's bundled lint rules now.