-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.rubocop.yml
62 lines (61 loc) · 1.41 KB
/
.rubocop.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# frozen_string_literal: true
AllCops:
NewCops: enable
TargetRubyVersion: 2.6
Exclude:
- 'config/**/*.rb'
- 'bin/*'
- 'db/**/*.rb'
- 'spec/**/*.rb'
Style/Documentation:
Enabled: false
# Use `foo {}` not `foo{}`.
Layout/SpaceBeforeBlockBraces:
Enabled: true
# Use `foo { bar }` not `foo {bar}`.
Layout/SpaceInsideBlockBraces:
Enabled: true
EnforcedStyleForEmptyBraces: space
# Use `{ a: 1 }` not `{a:1}`.
Layout/SpaceInsideHashLiteralBraces:
Enabled: true
# Detect hard tabs, no hard tabs.
Layout/IndentationStyle:
Enabled: true
# Empty lines should not have any spaces.
Layout/TrailingEmptyLines:
Enabled: true
# No trailing whitespace.
Layout/TrailingWhitespace:
Enabled: true
Layout/FirstHashElementLineBreak:
Enabled: true
Layout/LineLength:
Max: 90
Layout/MultilineHashBraceLayout:
EnforcedStyle: new_line
Layout/MultilineHashKeyLineBreaks:
Enabled: true
Lint/UselessAssignment:
Enabled: true
# Use my_method(my_arg) not my_method( my_arg ) or my_method my_arg.
Lint/RequireParentheses:
Enabled: true
Metrics/ClassLength:
Exclude:
- 'test/**/*.rb'
Metrics/MethodLength:
Max: 20
Metrics/BlockLength:
Exclude:
- 'Rakefile'
- '**/*.rake'
- 'test/**/*.rb'
Style/RedundantReturn:
Enabled: true
AllowMultipleReturnValues: true
Style/StringLiterals:
EnforcedStyle: double_quotes
# if-elsif constructions can be replaced with case-when
Style/CaseLikeIf:
Enabled: true