Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools::checkTnF() shows unknown macro warning #65

Closed
dpprdan opened this issue Dec 10, 2020 · 4 comments
Closed

tools::checkTnF() shows unknown macro warning #65

dpprdan opened this issue Dec 10, 2020 · 4 comments

Comments

@dpprdan
Copy link
Contributor

dpprdan commented Dec 10, 2020

tools::checkTnF(dir = ".") shows the following warnings when used on a package repository, {lifecyle} in this case:

> tools::checkTnF(dir = ".")
Warning messages:
1: In parse_Rd("C:/Users/dpprdan/Documents/R/github/lifecycle/man/badge.Rd",  :
  C:/Users/dpprdan/Documents/R/github/lifecycle/man/badge.Rd:47: unknown macro '\lifecycle'
2: In parse_Rd("C:/Users/dpprdan/Documents/R/github/lifecycle/man/badge.Rd",  :
  C:/Users/dpprdan/Documents/R/github/lifecycle/man/badge.Rd:48: unknown macro '\lifecycle'
3: In parse_Rd("C:/Users/dpprdan/Documents/R/github/lifecycle/man/badge.Rd",  :
  C:/Users/dpprdan/Documents/R/github/lifecycle/man/badge.Rd:49: unknown macro '\lifecycle'
4: In parse_Rd("C:/Users/dpprdan/Documents/R/github/lifecycle/man/badge.Rd",  :
  C:/Users/dpprdan/Documents/R/github/lifecycle/man/badge.Rd:50: unknown macro '\lifecycle'
5: In parse_Rd("C:/Users/dpprdan/Documents/R/github/lifecycle/man/badge.Rd",  :
  C:/Users/dpprdan/Documents/R/github/lifecycle/man/badge.Rd:51: unknown macro '\lifecycle'
6: In parse_Rd("C:/Users/dpprdan/Documents/R/github/lifecycle/man/badge.Rd",  :
  C:/Users/dpprdan/Documents/R/github/lifecycle/man/badge.Rd:52: unknown macro '\lifecycle'
7: In parse_Rd("C:/Users/dpprdan/Documents/R/github/lifecycle/man/badge.Rd",  :
  C:/Users/dpprdan/Documents/R/github/lifecycle/man/badge.Rd:53: unknown macro '\lifecycle'
8: In parse_Rd("C:/Users/dpprdan/Documents/R/github/lifecycle/man/badge.Rd",  :
  C:/Users/dpprdan/Documents/R/github/lifecycle/man/badge.Rd:54: unknown macro '\lifecycle'
9: In parse_Rd("C:/Users/dpprdan/Documents/R/github/lifecycle/man/badge.Rd",  :
  C:/Users/dpprdan/Documents/R/github/lifecycle/man/badge.Rd:55: unknown macro '\lifecycle'
10: In parse_Rd("C:/Users/dpprdan/Documents/R/github/lifecycle/man/signal_experimental.Rd",  :
  C:/Users/dpprdan/Documents/R/github/lifecycle/man/signal_experimental.Rd:26: unknown macro '\lifecycle'

This is comparable to #19, ropensci/spelling#42, ropensci/spelling#44, but since tools is a base package, it is not as easily fixed (plus checkTnF() does not allow passing on custom macros, as e.g. parse_Rd()).

Can this be fixed on the {lifecyle} side? Or would this require changes in checksTnF()?

I stumbled upon this while using goodpractice::gp() where tools::checkTnF(dir = ".") is one of the checks run.

@lionel-
Copy link
Member

lionel- commented Dec 10, 2020

With a recent roxygen, you can now use markdown in the documentation:

`r lifecycle::badge("deprecated")`

The \lifecycle macro is deprecated.

@lionel- lionel- closed this as completed Dec 10, 2020
@dpprdan
Copy link
Contributor Author

dpprdan commented Dec 10, 2020

Thanks @lionel-!

Which version is "recent" roxygen? Apparently, roxygen v7.1.0 is required.

This change isn't reflected in the docs, yet, IIUC.

@lionel-
Copy link
Member

lionel- commented Dec 10, 2020

yup sorry about that, updating the doc is on the backburner.

@lionel-
Copy link
Member

lionel- commented Dec 10, 2020

By the way this means that lifecycle becomes a build time dependency, so you can remove it from DESCRIPTION if you're not using any of the functions like deprecate_warn().

dpprdan added a commit to dpprdan/opencage that referenced this issue Dec 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants