Update ktlint to v0.48.0#5625
Conversation
This can be enabled again when this defect is fixed: ktlint/ktlint#1733
| this.root = root | ||
| positionByOffset = KtLintLineColCalculator | ||
| .calculateLineColByOffset(KtLintLineColCalculator.normalizeText(root.text)) | ||
| root.node.putUserData(KtLint.FILE_PATH_USER_DATA_KEY, root.name) |
There was a problem hiding this comment.
This value isn't read by any ktlint rules that we have wrappers for, so removing this line has no effect.
There was a problem hiding this comment.
This key is going to be removed anyway
// TODO: Remove in KtLint 0.49
rootNode.putUserData(KtLint.FILE_PATH_USER_DATA_KEY, code.filePath.toString())
| MaximumLineLength: | ||
| active: false | ||
| NoSemicolons: | ||
| active: false # https://github.com/pinterest/ktlint/issues/1733 |
There was a problem hiding this comment.
We want to fast-follow on this since this is being addressed in Ktlint 0.48.1 according to the comments.
| this.root = root | ||
| positionByOffset = KtLintLineColCalculator | ||
| .calculateLineColByOffset(KtLintLineColCalculator.normalizeText(root.text)) | ||
| root.node.putUserData(KtLint.FILE_PATH_USER_DATA_KEY, root.name) |
There was a problem hiding this comment.
This key is going to be removed anyway
// TODO: Remove in KtLint 0.49
rootNode.putUserData(KtLint.FILE_PATH_USER_DATA_KEY, code.filePath.toString())
I believe Detekt implementation for these rules is more flexible (Since ktlint is mostly on/off with limited configurability), hence I believe we should still add a wrapper rule for them (There can be cases where Detekt users turn off the detekt implementation and use ktlint). This can be a discussion / follow-up |
There are three new rules that I haven't added wrappers for, since we seem to have the same ones in detekt already:
Also had to disable
NoSemicolonsrule on detekt's codebase because of ktlint/ktlint#1733 but I'm sure that will be fixed soon. When this is merged I'll open a tracking issue for that.