Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a "base" config for Rubocop #611

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ engines:
enabled: true
csslint:
enabled: true
coffeelint:
enabled: true
duplication:
enabled: true
config:
Expand All @@ -23,6 +21,8 @@ engines:
rubocop:
enabled: true
channel: rubocop-1-56-3
config:
file: .rubocop.base.yml
ratings:
paths:
- Gemfile.lock
Expand Down
33 changes: 33 additions & 0 deletions .rubocop.base.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
AllCops:
Exclude:
- 'bin/**/*'
- 'config/**/*'
- 'db/**/*'
NewCops: enable

Lint/AmbiguousBlockAssociation:
Exclude:
- 'spec/**/*'

# Relax complexity testing to codeclimate standards (roughly).
Metrics/AbcSize:
Max: 20
Metrics/MethodLength:
Max: 20
Metrics/ClassLength:
Max: 160

Metrics/BlockLength:
Exclude:
- 'spec/**/*'

# Don't worry about documentation for now.
# In particular, this fails for things like
# controller files, which seems unnecessary.
Style/Documentation:
Enabled: false

# I think this cop disagrees with nested calls
# that are perfectly clear.
Style/NestedParenthesizedCalls:
Enabled: false
36 changes: 2 additions & 34 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,11 @@
inherit_from: .rubocop.base.yml

require:
- rubocop-rails
- rubocop-rspec
- rubocop-rspec_rails
- rubocop-capybara
- rubocop-factory_bot

AllCops:
Exclude:
- 'bin/**/*'
- 'config/**/*'
- 'db/**/*'
NewCops: enable

Lint/AmbiguousBlockAssociation:
Exclude:
- 'spec/**/*'

# Relax complexity testing to codeclimate standards (roughly).
Metrics/AbcSize:
Max: 20
Metrics/MethodLength:
Max: 20
Metrics/ClassLength:
Max: 160

Metrics/BlockLength:
Exclude:
- 'spec/**/*'

RSpec/NestedGroups:
Max: 4

# Don't worry about documentation for now.
# In particular, this fails for things like
# controller files, which seems unnecessary.
Style/Documentation:
Enabled: false

# I think this cop disagrees with nested calls
# that are perfectly clear.
Style/NestedParenthesizedCalls:
Enabled: false