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
Maybe a good way to start is using this file I could spend some time, I have also some interest on this: see r-lib/styler#331
I understand that this is different from r-lib/styler but I don't understand if there is any relationship between these packages or not. Anyway with that file it seems that it might be easier for me to use lintr
Use vapply() instead of sapply() and use the various apply functions instead of for loops.
Use seq_len() or seq_along() instead of 1:...
-Use TRUE/FALSE instead of T/F
Avoid class()== and class()!= instead use is()
Use system2() instead of system
Do not use set.seed in any internal R code.
No browser() calls should be in code
Avoid the use of <<-.
Avoid use of direct slot access with @ or slot(). Accessor methods should be created and utilized
Use <- instead of = for assignment
Function names should be camel case or utilize the underscore _ and not have a dot . which indicates S3 dispatch.
Use dev.new() to start a graphics drive if necessary. Avoid using x11() or X11() for it can only be called on machines that have access to an X server.
Encourage anyone that's interested to file PRs. Would especially be nice to include some for the 3.0.0 release. A lot of the points referenced in #43 (comment) are already doable with existing linters; others would be straightforward adaptations of existing logic (see e.g. the linters filed in #884). We can add the bioconductor tag to allow linters_with_tags("bioconductor") to facilitate easy .lintr configs.
Gonna close this issue so it's not just indefinitely open. We remain open to PRs, but none of the current maintainers are too familiar with BioConductor practices. Moving forward interested contributors might consider:
Filing individual PRs for supporting linters not yet available in {lintr}. If you know a particular rule you'd like to see, but are intimidated about getting started writing a new linter, please reach out & we are happy to help.
File feature requests for extending/parameterizing existing linters to support different styles.
File a new master issue listing out specific rules to support. The current issue has too much other discussion -- starting a new, focused issue with tangible end points would be more helpful.
Activity
mjsteinbaugh commentedon Jun 18, 2017
@jimhester Any update on this? Would love to see this feature added. I'd be happy to help contribute.
kjohnsen commentedon May 22, 2018
I'd also be interested in this 😃
jimhester commentedon May 23, 2018
For those interested I would gladly review a PR!
mjsteinbaugh commentedon May 23, 2018
Cool thanks Jim, I'll see if I can put together a list of rules that would be helpful.
kjohnsen commentedon May 23, 2018
I could use this since I'm developing a Bioconductor package now, so I'll see what I can do to help
jimhester commentedon May 24, 2018
https://bioconductor.org/developers/how-to/coding-style/ would probably be a useful place to start.
llrs commentedon Sep 27, 2018
Maybe a good way to start is using this file I could spend some time, I have also some interest on this: see r-lib/styler#331
I understand that this is different from r-lib/styler but I don't understand if there is any relationship between these packages or not. Anyway with that file it seems that it might be easier for me to use lintr
mjsteinbaugh commentedon Sep 27, 2018
@llrs I've been using this .lintr file in my packages, which has some additional checks
russHyde commentedon Nov 12, 2019
Hi @mjsteinbaugh , would you be OK if I used your .lintr for basejump to define a list of bioconductor defaults within lintr?
mjsteinbaugh commentedon Nov 12, 2019
Sure thing!
russHyde commentedon Nov 12, 2019
There's some additional best-practices mentioned here:
http://bioconductor.org/developers/package-guidelines/#rcode
-Use TRUE/FALSE instead of T/F
mjsteinbaugh commentedon Nov 12, 2019
Yes, refer to
BiocCheck::BiocCheck()for details on additional Bioconductor checks. In particular, I run it on CI with these flags: https://github.com/acidgenomics/Rcheck/blob/master/checks/bioc-checkmjsteinbaugh commentedon Nov 12, 2019
Also, one addition that would be particularly useful in my opinion is improved handling of internal S4 method functions, which currently return as lint errors. Here's an example:
https://github.com/acidgenomics/basejump/blob/master/R/counts-methods.R#L46
counts,SummarizedExperimentwill currently fail thecamelCaselint check. This is similar to the S3 method lint issue reported in #223.MichaelChirico commentedon Apr 5, 2022
Encourage anyone that's interested to file PRs. Would especially be nice to include some for the 3.0.0 release. A lot of the points referenced in #43 (comment) are already doable with existing linters; others would be straightforward adaptations of existing logic (see e.g. the linters filed in #884). We can add the
bioconductortag to allowlinters_with_tags("bioconductor")to facilitate easy.lintrconfigs.MichaelChirico commentedon Nov 14, 2023
Gonna close this issue so it's not just indefinitely open. We remain open to PRs, but none of the current maintainers are too familiar with BioConductor practices. Moving forward interested contributors might consider: