fix(lint): register new modules for lint, and auto-register all in CI#21064
Open
david-allison wants to merge 3 commits into
Open
fix(lint): register new modules for lint, and auto-register all in CI#21064david-allison wants to merge 3 commits into
david-allison wants to merge 3 commits into
Conversation
Using convention plugins. Updated: :anki-common:lint :common:android:lint :compat:lint * lint-rules is ignored due to a potential circular dependency * AnkiDroid is ignored as the convention plugin is pending * vbpd is ignored as it is vendored Fixes 21063 Assisted-by: Claude Opus 4.7
By defining a 'lintAll' gradle task Related to issue 21063 Assisted-by: Claude Opus 4.7 - all but comments
| if (path != ":lint-rules") { | ||
| pluginManager.apply("com.android.lint") | ||
| dependencies { | ||
| "lintChecks"(project(":lint-rules")) |
Contributor
There was a problem hiding this comment.
Minor: JVM modules don’t use lint.gradle because it depends on the android {} DSL. Custom rules are still FATAL, so builds will fail if they trigger, but checkTestSources won’t be applied. Probably fine for now.
Member
Author
There was a problem hiding this comment.
Seems OK for now, I'm surprised it worked at all
`lintVitalFullRelease` was copied from the publish script, `lintFullDebug` will find the same issues, so just call it Assisted-by: Claude Opus 4.7 - confirmation of correctness
f095e80 to
487242c
Compare
Giyutomioka-SS
approved these changes
May 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Note
Assisted-by: Claude Opus 4.7 - most of the code
Purpose / Description
A number of modules weren't using
lint-rules, fix them. Some are excluded, see commit 1 for detailsFixes
lintChecks(project(":lint-rules"))is not applied to all modules #21063Approach
How Has This Been Tested?
./gradlew lintAll ktLintCheck lintVitalFullRelease lint-rules:test --daemonLearning (optional, can help others)
I was surprised it was so easy to apply lint-rules to a
java-libraryBut there's no in-IDE support it seems for those files... only CI
Checklist