Skip to content
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

Incorrectly checks xpath and returns an error when publishing #244

Closed
bw4sz opened this issue Feb 12, 2018 · 2 comments · Fixed by #832
Closed

Incorrectly checks xpath and returns an error when publishing #244

bw4sz opened this issue Feb 12, 2018 · 2 comments · Fixed by #832
Labels
bug an unexpected problem or unintended behavior linting 🧥

Comments

@bw4sz
Copy link

bw4sz commented Feb 12, 2018

The local path checker is a bit overzealous and mistakes parsing of xml as the user trying to read in data. For example
I am interacting with a web API. I then need to do some parsing of the xml.

 r<-wcPOST()
  start_epoch <- as.numeric(now() - lubridate::days(days_lag))
  
  #Get program number
  xpath <- paste("//data/deployment/argos/last_uplink_date", 
                 "[number() > number(", start_epoch, ")]/../program_number", sep = "")
  program_number <- XML::xpathSApply(XML::xmlParse(content(r,"text")), xpath, XML::xmlValue)

yields

screen shot 2018-02-12 at 10 25 23 am

This all works great locally and hosted. Note there is no interaction with the local file system. But when I go to publish I get. "Paths should be to files within the project directory". I can force a 'yes' to override the check, but it could be improved.

Thanks.

@hadley hadley added the bug an unexpected problem or unintended behavior label Feb 21, 2023
@hadley
Copy link
Member

hadley commented Feb 21, 2023

Closely related to #611

@hadley
Copy link
Member

hadley commented May 2, 2023

Filter if the file exists — no easy way to do that because there's no actual path constructed by this linter.

hadley added a commit that referenced this issue May 2, 2023
* Remove "bad relative path linker". This used a very simple heuristic that had many possible false positives. Fixes #244.

* Only check case of potential paths that contain a `/`. This reduces the number of false positives. Fixes #611.
hadley added a commit that referenced this issue May 8, 2023
* Remove "bad relative path linker". This used a very simple heuristic that had many possible false positives. Fixes #244.

* Only check case of potential paths that contain a `/`. This reduces the number of false positives. Fixes #611.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior linting 🧥
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants