Skip to content

Commit afff185

Browse files
committed
Rubocop 1.9.1 config (#120)
1 parent ccfe81b commit afff185

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Given that all configuration inherits from RuboCop's default configuration
2+
# - see https://docs.rubocop.org/rubocop/configuration.html#inheritance - we
3+
# will just add corrections over the default configuration instead:
4+
Metrics/BlockLength:
5+
IgnoredMethods:
6+
- configure # Ignore the typical configuration blocks
7+
- describe # Ignore RSpec "describe" blocks
8+
- context # Ignore RSpec "context" blocks
9+
- namespace # Ignore Rake tasks namespace blocks on lib/tasks folder
10+
11+
# Let's disable all cops that are already implemented as maintainability checks
12+
# on CodeClimate:
13+
14+
# This cop has been implemented as the "method-lines" maintainability check:
15+
Metrics/MethodLength:
16+
enabled: false
17+
18+
# This cop has been implemented as the "argument-count" maintainability check:
19+
Metrics/ParameterLists:
20+
enabled: false
21+
22+
# This cop has been implemented as the "method-complexity" maintainability check:
23+
Metrics/PerceivedComplexity:
24+
enabled: false
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Given that all configuration inherits from RuboCop's default configuration
2+
# - see https://docs.rubocop.org/rubocop/configuration.html#inheritance - we
3+
# will just add corrections over the default configuration instead:
4+
Metrics/BlockLength:
5+
IgnoredMethods:
6+
- configure # Ignore the typical configuration blocks
7+
- describe # Ignore RSpec "describe" blocks
8+
- context # Ignore RSpec "context" blocks
9+
- namespace # Ignore Rake tasks namespace blocks on lib/tasks folder
10+
11+
# Let's all do Sandi Metz's 5 lines per method thing!
12+
Metrics/MethodLength:
13+
Description: 'Avoid methods longer than 5 lines of code.'
14+
Max: 5
15+
16+
# Also, let's keep method parameters under 5:
17+
Metrics/ParameterLists:
18+
Max: 4

0 commit comments

Comments
 (0)