Skip to content

Convert more linters to XPath logic #1258

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
4 tasks done
MichaelChirico opened this issue May 26, 2022 · 1 comment
Closed
4 tasks done

Convert more linters to XPath logic #1258

MichaelChirico opened this issue May 26, 2022 · 1 comment
Milestone

Comments

@MichaelChirico
Copy link
Collaborator

MichaelChirico commented May 26, 2022

There are a few more linters that would benefit from the efficiency/conciseness boost of moving to XPath:

Simple script to try and detect these below

# inside R/
r_files = setdiff(
  list.files(),
  c("cyclocomp_linter.R", "line_length_linter.R", "make_linter_from_regex.R", "path_linters.R", "single_quotes_linter.R", "trailing_blank_lines_linter.R")
)
for (file in r_files) {
  l = readLines(file)
  if (!any(grepl("Linter\\(function", l))) next
  if (!any(grepl("xml_find_all", l))) message(file)
}
@MichaelChirico
Copy link
Collaborator Author

Shall we put the 3.0.0 milestone on this? I am fine either way

@AshesITR AshesITR added this to the 3.0.0 milestone May 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants