We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
If the source code contains any invalid use of \, then lintr::lint() will stop working:
\
lintr::lint()
col <- c("a", \)
The case could be simplified to the following:
> parse(text = "\\") Error in parse(text = "\\") : <text>:1:1: unexpected input 1: \ ^ Backtrace: 1: parse(text = "\\") > lintr::lint("\\\n") Error in read_xml.raw(charToRaw(enc2utf8(x)), "UTF-8", ..., as_html = as_html, : StartTag: invalid element name [68] Backtrace: 1: read_xml.raw(charToRaw(enc2utf8(x)), "UTF-8", ..., as_html = as_html, 2: read_xml.character(xmlparsedata::xml_parse_data(pc)) 3: xml2::read_xml(xmlparsedata::xml_parse_data(pc)) 4: FUN(X[[i]], ...) 5: lapply(X = top_level_expressions(parsed_content), FUN = get_single_source_expression, 6: get_source_expressions(filename) 7: lintr::lint("\\\n")
Looks like it is caused by xmlparsedata writing invalid XML and lintr does not handle such case.
Before error occurs, pc got the following value:
pc
line1 col1 line2 col2 id parent token terminal text 1 1 1 1 1 1 0 \\ FALSE \\
xmlparsedata::xml_parse_data(pc) produces the following XML with invalid tokens:
xmlparsedata::xml_parse_data(pc)
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <exprlist> <\ line1="1" col1="1" line2="1" col2="1" start="3" end="3">\ </\> </exprlist>
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
If the source code contains any invalid use of
\
, thenlintr::lint()
will stop working:The case could be simplified to the following:
Looks like it is caused by xmlparsedata writing invalid XML and lintr does not handle such case.
Before error occurs,
pc
got the following value:xmlparsedata::xml_parse_data(pc)
produces the following XML with invalid tokens:The text was updated successfully, but these errors were encountered: