ropensci / spelling

Tools for Spell Checking in R
https://docs.ropensci.org/spelling
Other
107 stars 25 forks source link

Bookdown #32

Open maelle opened 5 years ago

maelle commented 5 years ago

tested locally on dev_guide, manually adding typos and removing DESCRIPTION to see whether it still works.

I was a bit stuck because get_wordlist() expected a package so I tweaked as_package().

At lot of the code depends on whether DESCRIPTION is present/absent, not very elegant.

cf #29

jeroen commented 5 years ago

I don't like that this changes the behavior of as_package to not return an error when the directory is not a package. The purpose is specifically to error when the user runs spell_check_package in a directory that is not a package.

maelle commented 5 years ago

I don't like that this changes the behavior of as_package to not return an error when the directory is not a package. The purpose is specifically to error when the user runs spell_check_package in a directory that is not a package.

How could I workaround this + still use get_wordlist()?

maelle commented 5 years ago

Would you be ok with my modifying get_wordlist() instead?

https://github.com/ropensci/spelling/blob/04ba5cb8ac56e336d10c81a291454638e9709816/R/wordlist.R#L53-L58

Could it e.g. work on a path instead of a package object?

maelle commented 5 years ago

Btw I'll have the same questions for update_wordlist() that'd be handy for a bookdown too.

codecov-io commented 5 years ago

Codecov Report

Merging #32 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #32   +/-   ##
=======================================
  Coverage   45.36%   45.36%           
=======================================
  Files           7        7           
  Lines         313      313           
=======================================
  Hits          142      142           
  Misses        171      171
Impacted Files Coverage Δ
R/parse-markdown.R 83.33% <ø> (ø) :arrow_up:
R/check-files.R 65.75% <ø> (ø) :arrow_up:
R/spell-check.R 30.82% <ø> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update a6f7bb1...ce08bdb. Read the comment docs.