Skip to content

Commit

Permalink
Fix typo in custom rule dev docs (palantir#2261)
Browse files Browse the repository at this point in the history
  • Loading branch information
andy-hanson authored and adidahiya committed Feb 28, 2017
1 parent 187b67e commit 9d8c4ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/develop/custom-rules/performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ Some examples:
`node.getStart()` scans the source to skip all the leading trivia. Although barely noticeable, this operation is not for free.
If you need the start position of a node more than once per function, consider caching it.
`node.getWidth()` is most of the time used together with `node.getStart()` to get the node's span. Internally it uses `node.getStart() - node.getEnd()` which effectively doubles the calls to `node.getStart()`. Consider using `node.getEnd()` instead and calculate the width yourself if necessary.
`node.getWidth()` is most of the time used together with `node.getStart()` to get the node's span. Internally it uses `node.getEnd() - node.getStart()` which effectively doubles the calls to `node.getStart()`. Consider using `node.getEnd()` instead and calculate the width yourself if necessary.
`node.getText()` calculates the start of the node and returns a substring until the end of the token.
Most of the time this not needed, because this substring is already contained in the node.
Expand Down

0 comments on commit 9d8c4ed

Please sign in to comment.