lawn icon indicating copy to clipboard operation
lawn copied to clipboard

Linting changes: Allow user to set behavior of linting, Use geojsonlint?

Open sckott opened this issue 8 years ago • 4 comments

@jhollist @ateucher

  1. In discussing the right hand rule, i noticed that our linting functionality in lawn always stops when the linter fails. Should we allow user to toggle this behavior to stop or simply warn when it fails?
  2. should we depend on geojsonlint R pkg (which is now on cran)? instead of using the js library geojsonhint - which is one of the options in geojsonlint R pkg (others are geojsonlint web API and geojson schema validation via is-my-json-valid JS library)

sckott avatar Oct 18 '16 16:10 sckott

Tricky, because I'd think in some cases you'd want it to fail, and in some (such as the winding issue), passing with a warning should suffice. But I don't know if there is that much granularity in the linter output?

I would think depending on geojsonlint R package makes sense, so you've not duplicating functionality. In rmapshaper I'm kind of toying with the idea of getting rid of linting altogether and letting the user worry about it... Maybe include geojsonhint in Suggests and show its use in some examples?

ateucher avatar Oct 18 '16 17:10 ateucher

I'm just now learning about linting, so I'll leave this to the both of you to decide...

jhollist avatar Oct 19 '16 16:10 jhollist

okay, thanks jeff

sckott avatar Oct 19 '16 16:10 sckott

Going to push this off until the next milestone.

Sorta complex. If we import geojsonlint, then that will require installing httr, not a huge deal, but kinda silly given we don't need to make http requests otherwise.

I think i remember wanting to keep linting at some point because errors returned from turf weren't always useful, but then again, the user can always do that themselves.

sckott avatar Oct 24 '16 22:10 sckott