-
-
Notifications
You must be signed in to change notification settings - Fork 396
/
.rubocop.yml
76 lines (70 loc) · 2.52 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
inherit_from: .rubocop_todo.yml
inherit_mode: { merge: [Exclude] }
require:
- rubocop-capybara
- rubocop-factory_bot
- rubocop-rails
- rubocop-rake
- rubocop-rspec
- rubocop-rspec_rails
AllCops:
DisplayCopNames: true
EnabledByDefault: true
Exclude:
- 'db/schema.rb'
- 'vendor/**/*'
Capybara/ClickLinkOrButtonStyle: { EnforcedStyle: link_or_button }
Layout/LineLength: { Max: 80, Exclude: [db/migrate/*.rb] }
Layout/RedundantLineBreak: { InspectBlocks: true }
Metrics/AbcSize: { Exclude: [db/migrate/*.rb], CountRepeatedAttributes: false }
Metrics/BlockLength:
Exclude: [config/**/*.rb, db/migrate/*.rb, spec/**/*.rb, db/seeds/**/*.rb]
Metrics/MethodLength: { Exclude: [db/migrate/*.rb] }
Rails/SkipsModelValidations: { AllowedMethods: [update_all] }
RSpec/DescribeClass: { Exclude: [spec/system/**/*] }
RSpec/MessageExpectation:
EnforcedStyle: expect
Exclude: [spec/support/matchers/**/*.rb]
RSpec/MessageSpies: { EnforcedStyle: receive }
RSpec/MultipleMemoizedHelpers: { AllowSubject: false, Max: 0 }
Style/ClassAndModuleChildren: { EnforcedStyle: compact }
Style/MethodCallWithArgsParentheses:
AllowedMethods:
- and
- to
- not_to
- describe
- require
- task
Exclude:
- db/**/*.rb
Style/StringLiterals: { EnforcedStyle: double_quotes }
Style/SymbolArray: { EnforcedStyle: brackets }
Style/WordArray: { EnforcedStyle: brackets }
# want to enable these, but they don't work right when using `.rubocop_todo.yml`
Style/DocumentationMethod: { Enabled: false }
Style/Documentation: { Enabled: false }
################################################################################
#
# Rules we don't want to enable
#
################################################################################
Bundler/GemComment: { Enabled: false }
Bundler/GemVersion: { Enabled: false }
Layout/SingleLineBlockChain: { Enabled: false }
Lint/ConstantResolution: { Enabled: false }
Rails/BulkChangeTable: { Enabled: false }
Rails/RedundantPresenceValidationOnBelongsTo: { Enabled: false }
RSpec/AlignLeftLetBrace: { Enabled: false }
RSpec/AlignRightLetBrace: { Enabled: false }
Rails/HasManyOrHasOneDependent: { Enabled: false }
RSpec/IndexedLet: { Enabled: false }
RSpec/StubbedMock: { Enabled: false }
Rails/SchemaComment: { Enabled: false }
Style/ConstantVisibility: { Enabled: false }
Style/Copyright: { Enabled: false }
Style/InlineComment: { Enabled: false }
Style/MissingElse: { Enabled: false }
Style/RequireOrder: { Enabled: false }
Style/SafeNavigation: { Enabled: false }
Style/StringHashKeys: { Enabled: false }