Last data update: 2014.03.03

R: Style checks
stylechecksR Documentation

Style checks

Description

Style checks

Usage

  spacing.linelength.80

  spacing.linelength.100

  spacing.indentation.notabs

  spacing.notabs

  spacing.indentation.evenindent

  spacing.spaceaftercomma

  spacing.spacearoundinfix

  spacing.spacearoundequals

  spacing.twobeforecomments

  lint.style

Format

Each test can be defined in several formats and is very flexible. A test consists of a names list of attributes.

  1. pattern is a pcre compatible regular expression that is tested. Can be a character vector of expressions.

  2. message The message to be displayed.

  3. include.region lists regions to restrict the search to. Can be a character vector specifying the known regions, or a list of functions that interpret output from getParseData.

  4. exclude.region=c('comments', 'string') lists regions to restrict the search to. Operates the sames as include.region.

  5. use.lines=T should the pattern be evaluated in lines (default) or as a contiguous block of text.

  6. warning=F

Results