ropensci / spelling

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

Added the possibility to add a WORDLIST file manually #41

Closed zappingseb closed 4 years ago

zappingseb commented 5 years ago

Close #40

I created this PR to allow users to specify the location of the WORDLIST. E.g. in R CMD check mode the wordlist would be located in normalizePath(file.path(pkg$path, "WORDLIST"))

codecov-io commented 5 years ago

Codecov Report

Merging #41 into master will decrease coverage by 1.17%. The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #41      +/-   ##
==========================================
- Coverage   45.11%   43.93%   -1.18%     
==========================================
  Files           7        7              
  Lines         317      305      -12     
==========================================
- Hits          143      134       -9     
+ Misses        174      171       -3
Impacted Files Coverage Δ
R/spell-check.R 31.7% <0%> (+0.88%) :arrow_up:
R/wordlist.R 0% <0%> (ø) :arrow_up:
R/rmarkdown.R 33.33% <0%> (-10.67%) :arrow_down:
R/parse-markdown.R 83.33% <0%> (-0.88%) :arrow_down:
R/remove-chunks.R 85.71% <0%> (-0.65%) :arrow_down:
R/check-files.R 63.51% <0%> (+0.35%) :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 569a24f...e701502. Read the comment docs.

jeroen commented 5 years ago

I rather fix the actual bug in 40 and find out why the WORDLIST doesn't work for your NEWS and description files. I don't understand why you would need a custom wordlist path for this.

zappingseb commented 5 years ago

Sounds good, please see my comment in #40 on our test repo: https://github.com/zappingseb/test_spelling

jeroen commented 4 years ago

See my comment here: https://github.com/ropensci/spelling/issues/40#issuecomment-539471312

You are using this the wrong way, you should be using the spell_check_setup() function to create a unit test. What you are doing right now doesn't make any sense because you try to run the spell check on the installed package, which only contains binary files. That is also why the WORDLIST is missing.