Closed Ilia-Kosenkov closed 1 year ago
(This is probably not an appropriate issue but related to lintr)
The fourth line of the following R file generated by extendr is checked by the commented code linter of lintr, so it is recommended to change it.
# Generated by extendr: Do not edit by hand
#
# This file was created with the following call:
# .Call("wrap__make_helloextendr_wrappers", use_symbols = TRUE, package_name = "helloextendr")
@eitsupi , I see, but we would like to keep this information in the wrapper (as it is emitted by extendr itself). Is there a way we can mark it so lintr does not check it?
It is described here. https://lintr.r-lib.org/articles/lintr.html?q=nolint#excluding-lines-of-code
The easiest way is to add # nolint
at the end on the line.
# Generated by extendr: Do not edit by hand
#
# This file was created with the following call:
# .Call("wrap__make_helloextendr_wrappers", use_symbols = TRUE, package_name = "helloextendr") # nolint
I guess it's better to exclude the whole file, since it is generated by extendr. I'll take a look a this soon.
Hey @eitsupi , can you try out {rextendr}
from this branch https://github.com/Ilia-Kosenkov/rextendr/tree/exclude-wrappers-from-linting? You can do this like so: remotes::install_github("Ilia-Kosenkov/rextendr", ref = "exclude-wrappers-from-linting")
Just install it, and run in your project rextendr::clean() ; rextendr::document()
to force re-compilation and wrapper generation. Let me know if it solves the linting issue.
@Ilia-Kosenkov I have installed with remotes::install_github("extendr/rextendr#214")
and tried on https://github.com/eitsupi/prqlr and this seems to work well, thanks!
Great, but it will take some time before I merge it since I need to update some tests now.
I think this is already done by https://github.com/extendr/rextendr/pull/229. Are there anything else to do before closing this issue?
You're right. Let me just close this issue as I agree.
{lintr}
is a package that highlights issues in the codebase. It can be used as a standalone tool or as a part of an editor/IDE (such as vscode). I propose to research{lintr}
application to{rextendr}
to improve the quality of code.{lintr}
using.lintr
file to enforce rules{lintr}
to CI (similar to howcargo fmt
is used inextendr
)