Skip to content

Hadley Style linters #4

Closed
Closed

Description

@jimhester

All from http://r-pkgs.had.co.nz/style.html Most should be pretty straight forward, some are a little tricky.

  • line length (80 120? + characters)
  • variable names
    • no camelCase
    • no multiple dots
    • very long variable names?
  • Spacing
    • infix operators have spaces around them
    • commas space after, none before
    • space before left parentheses
    • no spaces inside parentheses or square brackets
  • Curly braces
    • Open never on own line
    • Open always followed by a new line
    • Closing always on new line, unless an else
    • Code inside curly braces should be indented appropriately
  • no tab characters
  • Functions
    • verbs where possible
    • return() only for early returns (never at the end of a function)
  • Comments
    • should be a # followed by a space, or roxygen #'
  • only double quotes
  • <- not = for assignment

Activity

  1. added
    feature
    and removed on May 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions