goodpractice::gp()
Closed this issue · 0 comments
bpbond commented
Output from the goodpractice package:
It is good practice to
✖ write unit tests for all functions, and all package code in general. 56% of
code lines are covered by test cases.
R/one-time-transforms.R:5:NA
R/one-time-transforms.R:6:NA
R/one-time-transforms.R:7:NA
R/one-time-transforms.R:8:NA
R/one-time-transforms.R:10:NA
... and 589 more lines
This is because of one-time-transforms.R, which is intended as temporary/one-time routines and thus not covered by tests. Excluding this file, it's ~97%.
✖ add a "URL" field to DESCRIPTION. It helps users find information about your
package online. If your package does not have a homepage, add an URL to GitHub, or the
CRAN package package page.
✖ add a "BugReports" field to DESCRIPTION, and point it to a bug tracker. Many
online code hosting services provide bug trackers for free, https://github.com,
https://gitlab.com, etc.
Added.
✖ avoid long code lines, it is bad for readability. Also, many people prefer
editor windows that are about 80 characters wide. Try make your lines shorter than 80
characters
R/one-time-transforms.R:2:1
R/one-time-transforms.R:13:1
R/one-time-transforms.R:14:1
R/one-time-transforms.R:59:1
R/one-time-transforms.R:91:1
... and 181 more lines
See above–one-time-transforms.R
is a temporary file.
✖ avoid calling setwd(), it changes the global environment. If you need it,
consider using on.exit() to restore the working directory.
R/release.R:131:5
R/release.R:134:5
This is already done (the second setwd()
call restores the original wd).
✖ avoid sapply(), it is not type safe. It might return a vector, or a list,
depending on the input data. Consider using vapply() instead.
R/parser.R:189:10
R/utils.R:150:17
R/utils.R:163:39
R/utils.R:604:13
Fixed.