ropensci / slopes

Package to calculate slopes of roads, rivers and trajectories
https://docs.ropensci.org/slopes/
GNU General Public License v3.0
70 stars 6 forks source link

goodpractice results #26

Closed Robinlovelace closed 3 years ago

Robinlovelace commented 3 years ago

After running goodpractice::gp() I get:

── GP slopes ─────────────────────────────────────────────────────────────────────────────

It is good practice to

  ✖ write unit tests for all functions, and all package code in general. 75% of
    code lines are covered by test cases.

    R/plot_slope.R:30:NA
    R/plot_slope.R:31:NA
    R/plot_slope.R:77:NA
    R/plot_slope.R:78:NA
    R/plot_slope.R:79:NA
    ... and 34 more lines

  ✖ 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.
  ✖ use '<-' for assignment instead of '='. '<-' is the standard, and R users
    and developers are used it and it is easier to read your code for them if
    you use '<-'.

    R/plot_slope.R:13:12
    R/plot_slope.R:30:6
    R/plot_slope.R:59:9
    R/plot_slope.R:79:7
    R/plot_slope.R:80:9
    ... and 136 more lines

  ✖ 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/data.R:65:1
    R/slopes.R:127:1
    R/slopes.R:214:1
    tests/testthat/test-slopes.R:54:1
    tests/testthat/test-slopes.R:56:1

  ✖ fix this R CMD check NOTE: Namespace in Imports field not imported from:
    ‘methods’ All declared Imports should be used.
  ✖ fix this R CMD check WARNING: LaTeX errors when creating PDF version. This
    typically indicates Rd problems.