Skip to content

Commit

Permalink
Use helper functions directly from ktlint instead of copies
Browse files Browse the repository at this point in the history
These functions formerly were private but are public now, see
pinterest/ktlint#725.
  • Loading branch information
sschuberth committed Jun 3, 2020
1 parent e8bc08a commit 21e90e6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 78 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ abstract class FormattingRule(config: Config) : Rule(config) {
override fun visit(root: KtFile) {
this.root = root
root.node.putUserData(KtLint.ANDROID_USER_DATA_KEY, isAndroid)
positionByOffset = calculateLineColByOffset(normalizeText(root.text))
positionByOffset = KtLint.calculateLineColByOffset(KtLint.normalizeText(root.text))
editorConfigUpdater()?.let { updateFunc ->
val oldEditorConfig = root.node.getUserData(KtLint.EDITOR_CONFIG_USER_DATA_KEY)
root.node.putUserData(KtLint.EDITOR_CONFIG_USER_DATA_KEY, updateFunc(oldEditorConfig))
Expand Down

This file was deleted.

0 comments on commit 21e90e6

Please sign in to comment.