Created
March 16, 2016 05:25
-
-
Save seanknox/888cb6843fff0a282771 to your computer and use it in GitHub Desktop.
Rubocop example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AllCops: | |
Include: | |
- '**/Rakefile' | |
- '**/config.ru' | |
- 'lib/tasks/**/*' | |
Exclude: | |
- bin/* | |
- db/schema.rb | |
- vendor/bundle/**/* | |
TargetRubyVersion: 2.3 | |
Rails: | |
Enabled: true | |
# We prefer clarity (and seachability) over concise/DRY migrations. | |
Metrics/AbcSize: | |
Exclude: | |
- db/migrate/* | |
# We don't care about method length, since we check method cyclomatic | |
# complexity. | |
Metrics/MethodLength: | |
Enabled: false | |
Metrics/ClassLength: | |
Enabled: false | |
Metrics/ModuleLength: | |
Enabled: false | |
# Trailing commas make for clearer diffs because the last line won't appear | |
# to have been changed, as it would if it lacked a comma and had one added. | |
Style/TrailingCommaInArguments: | |
EnforcedStyleForMultiline: comma | |
Style/TrailingCommaInLiteral: | |
EnforcedStyleForMultiline: comma | |
# Cop supports --auto-correct. | |
# Configuration parameters: PreferredDelimiters. | |
Style/PercentLiteralDelimiters: | |
PreferredDelimiters: | |
# Using `[]` for string arrays instead of `()`, since normal arrays are | |
# indicated with `[]` not `()`. | |
'%w': '[]' | |
'%W': '[]' | |
'%i': '[]' | |
Style/Documentation: | |
Exclude: | |
- app/helpers/**/* | |
- db/**/* | |
Rails/TimeZone: | |
EnforcedStyle: 'flexible' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment