Skip to content

Instantly share code, notes, and snippets.

@jesg
Created April 14, 2015 21:42
Show Gist options
  • Select an option

  • Save jesg/eaa9ec037ed4393ea70c to your computer and use it in GitHub Desktop.

Select an option

Save jesg/eaa9ec037ed4393ea70c to your computer and use it in GitHub Desktop.
# Common configuration.
AllCops:
# Additional cops that do not reference a style guide rule may be enabled by
# default. Change behavior by overriding StyleGuideCopsOnly, or by giving
# the --only-guide-cops option.
StyleGuideCopsOnly: true
# Use ` or %x around command literals.
Style/CommandLiteral:
EnforcedStyle: mixed
# Checks formatting of special comments
Style/CommentAnnotation:
Keywords:
- EVIL
Style/HashSyntax:
EnforcedStyle: hash_rockets
Style/IfUnlessModifier:
MaxLineLength: 80
# Use / or %r around regular expressions.
Style/RegexpLiteral:
EnforcedStyle: mixed
# slashes: Always use slashes.
# percent_r: Always use %r.
# mixed: Use slashes on single-line regexes, and %r on multi-line regexes.
Style/SignalException:
EnforcedStyle: only_raise
SupportedStyles:
- only_raise
- only_fail
- semantic
Style/WhileUntilModifier:
MaxLineLength: 80
##################### Metrics ##################################
Metrics/BlockNesting:
Max: 4
Metrics/ClassLength:
CountComments: false # count full line comments?
Max: 500
# Avoid complex methods.
Metrics/CyclomaticComplexity:
Max: 6
Metrics/LineLength:
Max: 80
# To make it possible to copy or click on URIs in the code, we allow lines
# contaning a URI to be longer than Max.
AllowURI: true
URISchemes:
- http
- https
Metrics/MethodLength:
CountComments: false # count full line comments?
Max: 30
Metrics/PerceivedComplexity:
Max: 7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment