-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.yml
183 lines (143 loc) · 4.37 KB
/
default.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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
require:
- rubocop-rails
- rubocop-rspec
- rubocop-performance
AllCops:
TargetRubyVersion: 2.4
DisplayCopNames: true
# Do not sort gems in Gemfile, since we are grouping them by functionality.
Bundler/OrderedGems:
Enabled: false
# Add a comment before each gem in Gemfile.
Bundler/GemComment:
Enabled: true
# Trailing commas are required on multiline method arguments.
Style/TrailingCommaInArguments:
EnforcedStyleForMultiline: comma
# Trailing commas are required in multiline arrays.
Style/TrailingCommaInArrayLiteral:
EnforcedStyleForMultiline: comma
# Trailing commas are required in multiline hashes.
Style/TrailingCommaInHashLiteral:
EnforcedStyleForMultiline: comma
# Allow indenting multiline chained operations.
Layout/MultilineMethodCallIndentation:
EnforcedStyle: indented
# Allow empty lines around blocks in specs.
Layout/EmptyLinesAroundBlockBody:
Exclude:
- spec/**/*
# Allow not adding parentheses around blocks in DSLs.
# E.g.:
# expect { … }.to change { … }
Lint/AmbiguousBlockAssociation:
Exclude:
- spec/**/*
# Limit method length (default is 10).
Metrics/MethodLength:
Max: 15
# Limit class length (default is 100).
Metrics/ClassLength:
Max: 200
# Allow methods called `set_*` in controllers.
Naming/AccessorMethodName:
Exclude:
- app/controllers/**/*
# Do not require `# frozen_string_literal: true` at the top of every file.
Style/FrozenStringLiteralComment:
Enabled: false
# Allow non-ASCII comments (e.g "…").
Style/AsciiComments:
Enabled: false
# Do not comment the class we create, since the name should be self explanatory.
Style/Documentation:
Enabled: false
# Do not verify the length of the blocks in DSLs.
Metrics/BlockLength:
Exclude:
- spec/**/*
- "**/*/spec/**/*"
- lib/tasks/**/*
- app/admin/**/*
- config/routes.rb
- Gemfile*
ExcludedMethods:
- included
# Allow any number of keyword arguments in methods.
Metrics/ParameterLists:
CountKeywordArgs: false
Metrics/AbcSize:
Max: 16
# Prefer `a_variable_1` to `a_variable1`.
Naming/VariableNumber:
EnforcedStyle: snake_case
# Do not enforce using `str.casecmp('foo') == 0` instead of
# `str.downcase == 'foo'` for performance reasons.
Performance/Casecmp:
Enabled: false
# Prefer `== 0`, `< 0`, `> 0` to `zero?`, `negative?` or `positive?`,
# since they don't exist before Ruby 2.3 or Rails 5 and can be ambiguous.
Style/NumericPredicate:
EnforcedStyle: comparison
# This cop by default assumes that `Rails.root.join('foo', 'bar')` works
# better under Windows than `Rails.root.join('foo/bar')`.
Rails/FilePath:
EnforcedStyle: slashes
# Do not checks for the use of output safety calls like `html_safe` and `raw`,
# we know what we are doing.
Rails/OutputSafety:
Enabled: false
# Allow `update_attribute`, we know when to use it.
Rails/SkipsModelValidations:
Enabled: false
# Allow creating tables without timestamps, whe know what we are doing.
Rails/CreateTableWithTimestamps:
Enabled: false
# Do not force the use of bulk change table when there are several actions in
# a migration file
Rails/BulkChangeTable:
Enabled: false
# Do not enforce the use of `delegate`, since small methods are easier to
# read.
Rails/Delegate:
Enabled: false
# Allow using `allow_any_instance_of` for stubbing.
RSpec/AnyInstance:
Enabled: false
# Allow `let!` to setup test data in specs.
RSpec/LetSetup:
Enabled: false
# Allow a nesting of up to 5 of describe/context blocks (default is 3).
RSpec/NestedGroups:
Max: 5
# Allow chains message stubbing.
RSpec/MessageChain:
Enabled: false
# Allow any number of expectations in an example, for performance.
RSpec/MultipleExpectations:
Enabled: false
# Allow using normal test doubles, since they are useful for mocking.
RSpec/VerifiedDoubles:
Enabled: false
# Limit example length (default is 5).
RSpec/ExampleLength:
Max: 10
# Allow the use of `!!` to force values into booleans.
Style/DoubleNegation:
Enabled: false
# Prefer `change { User.count }` to `change(User, :count)`.
RSpec/ExpectChange:
EnforcedStyle: block
# Allow template token "%{foo}" since they are used in translation keys.
Style/FormatStringToken:
EnforcedStyle: template
# Prefer `->` to `lambda`.
Style/Lambda:
EnforcedStyle: literal
# Allow `if !` since `unless` can be harder to read.
Style/NegatedIf:
Enabled: false
# Allow simple blocks in ActiveAdmin DSL.
Style/SymbolProc:
Exclude:
- app/admin/**/*