ktlint icon indicating copy to clipboard operation
ktlint copied to clipboard

Refactor AstNodeExtensions - use properties with getters

Open paul-dingemans opened this issue 9 months ago • 0 comments

Most likely we want to define this as property with a getter in AstNodeExtensions:

public val ASTNode.isLeaf: Boolean
   get() = firstChildNode == null

There are many functions defined in ASTNodeExtension which probably could better have been define in similar way. So we can also park this in a separate change.

Originally posted by @paul-dingemans in https://github.com/pinterest/ktlint/pull/2901#discussion_r1887266435

paul-dingemans avatar Jan 01 '25 20:01 paul-dingemans