You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Context: when using e.g. goodpractice::gp() or lintr::package_lint() the output can be seen in the Markers pane of RStudio. That way when double-clicking on a remark one lands at the right line of the right file which makes editing easier.
I wonder if a similar functionality could be implemented for devtools::spell_check()? I do realize that it has an added difficulty: the current output of devtools::spell_check() gives the line numbers and files where the typos were found, which is in .Rd while the file one would like to edit is (most often) a .R.
The text was updated successfully, but these errors were encountered:
I don't there is a way to map Rd output back to the roxygen comment, as the relationship is not one to one.
However an alternative would be modifying devtools::spell_check() to search roxygen comment lines (#') in .R files as well / in place of .Rd. This is generally more useful anyway because it tells you what needs to be edited. Probably the easiest way to do this is to use a regex that blanks out non-roxygen comment lines, then run the spell check function on those files.
In trying to test this, I found that spelling, called from spell-check.R, is only a "Suggests" not "Required" package. Calling devtools::spell_check() failed because this pkg was missing. Should it be moved to "Required"?
No, it is that way by design, we try to keep the number of "hard" dependencies relatively low for devtools. The spelling package is only required for the spell_check() function, so it is not installed by default.
We could add a call to check_suggested("spelling") to spell_check() however, which would give you a more useful error message, and prompt to install the package if it is not installed.
Given that this has now been open for ~5 years, I think it's unlikely we're going to implement it. Additionally, it feels less important now that RStudio has inline spelling checking.
Context: when using e.g.
goodpractice::gp()
orlintr::package_lint()
the output can be seen in the Markers pane of RStudio. That way when double-clicking on a remark one lands at the right line of the right file which makes editing easier.I wonder if a similar functionality could be implemented for
devtools::spell_check()
? I do realize that it has an added difficulty: the current output ofdevtools::spell_check()
gives the line numbers and files where the typos were found, which is in .Rd while the file one would like to edit is (most often) a .R.The text was updated successfully, but these errors were encountered: