Comments (4)
I can't reproduce this problem. When I run spell_check_package(".", vignettes = TRUE)
in a pkg dir, the results do not include words from the README.md or DESCRIPTION if those words are in the wordlist.
I find it very strange that inst/inst/WORDLIST
solves your problem. Are you running this inside a source package or installed package?
from spelling.
Hi. I created a repo to show our thing:
https://github.com/zappingseb/test_spelling
Inside this repo everything is fine on devtools::test()
but it fails in devtools::check()
We created a second branch with the duplicated inst
directory, where devtools::check
works fine.
from spelling.
You have a very broken test setup. You are using testthat in which you load devtools and then you call spelling.
Your code doesn't work at all because you are running it on the installed package, which doesn't have the source code for the manual pages.
Can you please try instead to use spell_check_setup()
to create the unit test? Or just copy the unit tests from any of the other packages that use spelling? So it looks like this: https://github.com/cran/curl/tree/master/tests
from spelling.
Thank you @jeroen
we noticed that our setup did not suite the spelling
package
We changed the setup to this:
pkg <- get_package_info(source = TRUE)
if (grepl("lib", pkg$path)) {
dir.create(file.path(pkg$path, "inst"))
file.copy(file.path(pkg$path, "WORDLIST"), file.path(pkg$path, "inst/WORDLIST"))
}
test_that("misspelling", {
spell_error <- spelling::spell_check_package(pkg, vignettes = TRUE, use_wordlist = TRUE)
expect(
nrow(spell_error) == 0,
failure_message = apply(
spell_error, 1,
function(word) paste0("\nmisspelled word '", word[1], "' in ", word[2])
) %>%
paste(collapse = "")
)
})
This allowed us working with installed packages without screwing with your package.
Sorry for the inconvenience
from spelling.
Related Issues (20)
- Spell check Roxygen documentation comments
- spell_check_package() to include NEWS and ChangeLog too HOT 2
- Rmd files with LaTeX
- Error in read_xml.raw HOT 5
- Specify additional arbitrary package files to check
- CRAN spelling: spell_check_files with files in different directories
- "PCDATA invalid Char value" error HOT 3
- Exclude specific files from spell check similar to a `.gitignore` file HOT 1
- WISH: Add support for .aspell/defaults.R and .aspell/WORDLIST.rds
- Avoid spell check for `References` section of Roxygen2 function documentation HOT 1
- Links get treated as text in commonmark 1.9.0 HOT 2
- Error in read_xml.raw: Input is not proper UTF-8, indicate encoding !
- Declared encoding is not used in a package?
- Error in sub(dest, "", xml2::xml_text(node), fixed = TRUE) : zero-length pattern HOT 4
- Add support for using multiple dictionaries / languages HOT 3
- FR: Use clickable hyperlinks in `spell_check_*()`
- Mention `update_wordlist()` on spell check failure
- [feature request] `.qmd` (quarto) format
- Add support to multiple WORDLISTs HOT 4
- `update_wordlist()` claims that it will remove from WORDLIST words from `SPELLING_WORDLIST`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spelling.