View source: R/03b_doubleSpaceLinter.R View source: R/03a_additionalLinters.R
get_comment_nodes_with_prior_code | R Documentation |
We need to account for special cases like "x <- 3 # Hello world", where both double spaces are invalid and should therefore be detected as lint. This function first pairs nodes that have code and text on the same line and then compares the amount of spaces - between code and "#", - between "#" and text.
We need to account for special cases like "x <- 3 # Hello world", where both double spaces are invalid and should therefore be detected as lint. This function first pairs nodes that have code and text on the same line and then compares the amount of spaces - between code and "#", - between "#" and text.
get_comment_nodes_with_prior_code(comment_nodes, code_nodes)
get_comment_nodes_with_prior_code(comment_nodes, code_nodes)
comment_nodes |
Node list extracted with the XPath for comments/strings |
code_nodes |
Node list extracted with the XPath for code |
Node List containing lints between code and comments
Node List containing lints between code and comments
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.