STYLE.md

STYLE-GUIDE

  1. All classes are S3.
  2. Where a function/method name overlaps with a tidyverse or tidygraph function, use the same argument names/order as in the tidy* equivalent.
  3. Run styler::style_pkg() before check-in (default settings); this applies most of tidyverse style (indentation etc)
  4. Run all unit-tests before check-in; this ensures that lintr is ran with the package lint-setup (as defined in .lintr)
  5. Parameter definitions / importFroms etc in Roxygen docs start on the 4th (for @param/@importFrom etc), 18th (for param / package name) and 32nd character (for everything else) of an "@"-containing line, if possible. If the preceding text overruns, there should be three spaces between elements.
  6. Functions should start with verbs (is/filter/activate) unless they are getters / setters for class attributes / entries or conform to wider usage in R syntax (as_poly_frame)
  7. lint summary:

    • snake_case (including for class-names)
    • max-line-length: 80
    • max-object-length: 40
    • '<-' over '='
    • no trailing blanks (at end of line, or end of file)
    • etc etc - default linters in lintr, minus those mentioned in .lintr

Note:

Exceptions:



russHyde/polyply documentation built on July 13, 2019, 11:05 a.m.