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

style(lint) manual fixes for gradle.ktlint 12.1.1 / ktLint 1.5.0 #17577

Merged
merged 1 commit into from
Dec 9, 2024

Conversation

david-allison
Copy link
Member

@david-allison david-allison commented Dec 9, 2024

This is incomplete, but please merge to reduce conflicts

Pending:

  standard:discouraged-comment-location: 52
  standard:no-consecutive-comments: 46
  standard:max-line-length: 40
  standard:property-naming: 24
  standard:no-trailing-spaces: 6
  standard:annotation: 2
  standard:chain-wrapping: 2
  standard:dot-spacing: 2
  standard:no-consecutive-blank-lines: 2
  standard:kdoc-wrapping: 1

This prepares for the gradle plugin upgrade
And some for ktLint 1.5.0

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

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)

Checklist

  • You have a descriptive commit message with a short title (first line, max 50 chars).
  • You have commented your code, particularly in hard-to-understand areas
  • You have performed a self-review of your own code
  • UI changes: include screenshots of all affected screens (in particular showing any new or changed strings)
  • UI Changes: You have tested your change using the Google Accessibility Scanner

**This is incomplete**

This prepares for the gradle plugin upgrade
And some for ktlint 1.5.0

`./gradlew ktLintCheck` passes after this commit

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

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]>
Copy link
Member

@mikehardy mikehardy left a comment

Choose a reason for hiding this comment

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

thanks for taking this on, been hanging out forever!

@mikehardy mikehardy added this pull request to the merge queue Dec 9, 2024
Merged via the queue into ankidroid:main with commit d7f67ad Dec 9, 2024
9 checks passed
@github-actions github-actions bot added this to the 2.21 release milestone Dec 9, 2024
@david-allison david-allison deleted the ktlint-dep-2 branch December 9, 2024 14:39
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