-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
build(deps): bump org.jlleitschuh.gradle.ktlint from 11.6.1 to 12.1.1 & ktlint 1.5.0 #17581
Conversation
Appears to be caused by an annotation on a case
This prepares for the gradle plugin upgrade And some for ktlint 1.5.0 after updating gradle.ktlint, the following command now succeeds `./gradlew --rerun-tasks AnkiDroid:ktLintFormat` Process: * run `./gradlew AnkiDroid:ktlintFormat` * find the file and line number * rollback the changes (line numbers no longer match) * fix the error * amend to this commit disabling git hooks * ignored a class of error regarding comment placement * common to have block comments after KDocs on classes Some issues: * Exceeded max line length (140) (cannot be auto-corrected) * a block comment may not be preceded by a block comment (cannot be auto-corrected) * a block comment may not be preceded by an EOL comment unless separated by a blank line (cannot be auto-corrected) * an EOL comment may not be preceded by a block comment unless separated by a blank line (cannot be auto-corrected) * an EOL comment may not be preceded by a KDoc. Reversed order is allowed though when separated by a newline. (cannot be auto-corrected) * A comment inside or on same line after a 'value_parameter' is not allowed. It may be placed on a separate line above. (cannot be auto-corrected) * A block comment in between other elements on the same line is disallowed (cannot be auto-corrected) Co-authored-by: David Allison <[email protected]>
This prepares for the gradle plugin upgrade And some for ktlint 1.5.0 after updating gradle.ktlint, the following command now succeeds `./gradlew --rerun-tasks ktLintFormat` Process: * update ktlint in 'libs.versions.toml' to 12.1.1 * run `./gradlew --rerun-tasks ktlintFormat` * rollback * run `./gradlew --rerun-tasks ktlintFormat` * manually fixup remaining issues
99fb8d5
to
686e2a8
Compare
Bumps org.jlleitschuh.gradle.ktlint from 11.6.1 to 12.1.1. Then run `./gradlew --rerun-tasks ktlintFormat` --- updated-dependencies: - dependency-name: org.jlleitschuh.gradle.ktlint dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]>
* update dependency * `./gradlew --rerun-tasks ktLintFormat` * revert dependency * commit
Manually fixed up the result of `./gradlew --rerun-tasks ktLintFormat` I had issues with `libs.versions.toml`, so this was left as a TODO
This depends on ktlint, which we will want as a dependency
686e2a8
to
9fae928
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow! Someone's going for the LOC-changed-leaderboard 😆
The whole point of autolinters is not to argue about them, I personally see no point in it
As long as everyone is aware that they will need to rebase their PRs after this - needs a big announcement I think? - works for me
This dependency has hung out for far too long and it really queued up quite the change
I do want to note I added: # We often have block comments representing implementation details after KDocs.
# This feels like an acceptable commenting strategy
ktlint_standard_no-consecutive-comments = disabled This did not like
We lose out on the following, which is a little messy Anki-Android/AnkiDroid/src/main/java/com/ichi2/libanki/Tags.kt Lines 88 to 98 in e38bfe4
But the fix with additional lines was worse: /*
* List-based utilities
* ***********************************************************
*/
// this is now a no-op - the tags are canonified when the note is saved
/** {@inheritDoc} */
fun canonify(tagList: List<String>): AbstractSet<String> {
// libAnki difference: tagList was returned directly
return HashSet(tagList)
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you
Reviewers: please pay attention to the manual changes in the commits. They have been fully split out
Important
Please don't merge anything else until after this is merged, or will be a define "can't merge".
This is almost certainly going to conflict, and took a LOT of work to get into a good state
Note: this could be split into 2 PRs: one per dependency, but it felt sensible to combine the two, as was done in the linked commit
Fixes
Approach
Similar approach to both:
./gradlew --rerun-tasks ktLintFormat
./gradlew --rerun-tasks ktLintFormat
again./gradlew --rerun-tasks ktLintFormat
How Has This Been Tested?
CI.
Ran
./gradlew --rerun-tasks ktLintFormat
on each commit. Success, and no changesLearning (optional, can help others)
We really shouldn't let lint get out of date
CardBrowser
caused by annotations on awhen
.ktlint didn't seem to like it. Fixed in 1.5.0 I believe, but one to note
Checklist