-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.rubocop.yml
127 lines (99 loc) · 2.33 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
inherit_from: .rubocop_todo.yml
require:
- rubocop-performance
- rubocop-rails
AllCops:
NewCops: enable
TargetRubyVersion: 2.7
DisplayCopNames: true
DisplayStyleGuide: true
Include:
- 'Gemfile'
- 'Rakefile'
- 'config.ru'
- '*.gemspec'
- 'exe/*'
- 'lib/**/*.rb'
- 'test/**/*.rb'
Exclude:
- 'classes/**/*'
- 'gemfiles/vendor/**/*'
- 'node_modules/**/*'
- 'public/**/*'
- 'tmp/**/*'
- 'vendor/bundle/**/*'
# Typical construction is
# assert_match /something/, test_subject
Lint/AmbiguousRegexpLiteral:
Exclude:
- 'test/**/*.rb'
Layout/AssignmentIndentation:
IndentationWidth: 4
Layout/FirstArgumentIndentation:
EnforcedStyle: consistent
IndentationWidth: 4
Layout/FirstArrayElementIndentation:
EnforcedStyle: consistent
Layout/FirstHashElementIndentation:
EnforcedStyle: consistent
Layout/HashAlignment:
EnforcedLastArgumentHashStyle: ignore_implicit
Layout/LineLength:
Max: 107
AllowHeredoc: true
AllowURI: true
IgnoreCopDirectives: true
Exclude:
- 'config/initializers/secret_token.rb'
- 'db/schema*.rb'
Layout/MultilineMethodCallIndentation:
EnforcedStyle: indented
IndentationWidth: 4
Layout/MultilineOperationIndentation:
EnforcedStyle: indented
IndentationWidth: 4
Layout/ParameterAlignment:
EnforcedStyle: with_fixed_indentation
IndentationWidth: 4
Metrics/BlockLength:
Exclude:
- '*.gemspec'
- 'config/environments/development.rb'
- 'config/environments/production.rb'
- 'config/routes.rb'
- 'db/schema*.rb'
Naming/VariableNumber:
Enabled: false
Rails:
Enabled: true
Rails/ApplicationRecord:
Exclude:
- 'db/migrate/*.rb'
Rails/FilePath:
Enabled: false
Security/Eval:
Exclude:
- gemfiles/*.gemfile # We know of no other way to share common Gemfile partials
Style/ClassAndModuleChildren:
Enabled: false
Style/Documentation:
Enabled: false
Style/DoubleNegation:
Enabled: false
Style/Encoding:
Enabled: true
Style/FormatString:
EnforcedStyle: percent
Style/Lambda:
EnforcedStyle: literal
Style/NumericLiterals:
Exclude:
- 'db/schema*.rb'
Style/NumericPredicate:
Enabled: false
Style/SafeNavigation:
ConvertCodeThatCanStartToReturnNil: true
Style/TrailingCommaInArrayLiteral:
EnforcedStyleForMultiline: comma
Style/TrailingCommaInHashLiteral:
EnforcedStyleForMultiline: comma