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

Move EditorConfig comment to separate line #98

Merged
merged 1 commit into from
Nov 28, 2022

Conversation

jp7677
Copy link
Collaborator

@jp7677 jp7677 commented Nov 28, 2022

From https://editorconfig.org/#file-format-details "Comments should go on their own lines."

As a side effect, this prevents an exception in the IntelliJ Ktlint extension which otherwise interprets 120 as a string.
Granted, the extension itself should handle this more elegantly...

From https://editorconfig.org/#file-format-details
"Comments should go on their own lines."

As a side effect, this prevents an exception in the IntelliJ
Ktlint extension which otherwise interprets 120 as a string.
Granted, the extension itself should also handle this more
elegantly ...
@jp7677 jp7677 changed the title Move comment to separate line Move EditorConfig comment to separate line Nov 28, 2022
@jp7677
Copy link
Collaborator Author

jp7677 commented Nov 28, 2022

PS: If you wanna actually use ktlint, we should increase the max-line to 140 and add the following to the editor-config

[*.{kt,kts}]
# noinspection EditorConfigKeyCorrectness
disabled_rules = multiline-if-else
# noinspection EditorConfigKeyCorrectness
disabled_rules = no-wildcard-imports

Ktlint still has a few smaller complaints after applying this, but all can be auto corrected by ktlint (e.g. with ./gradlew ktlintFormat when adding id("org.jlleitschuh.gradle.ktlint") version "11.0.0" as a ktlint gradle plugin).

@dirkgroot dirkgroot merged commit 377a633 into avisi-cloud:main Nov 28, 2022
@jp7677 jp7677 deleted the editor-config-comments branch November 28, 2022 12:48
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.

None yet

2 participants