-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.rubocop.yml
86 lines (67 loc) · 1.43 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
require:
- rubocop-rails
- standard
inherit_gem:
standard:
- config/ruby-3.0.yml
AllCops:
TargetRailsVersion: 6.0
NewCops: enable
Exclude:
- "bin/**/*"
- "db/schema.rb"
- "script/**/*"
- "tmp/**/*"
- "uploads/**/*"
- "vendor/**/*"
- "**/*.erb"
Lint/UnusedMethodArgument:
AllowUnusedKeywordArguments: true
Metrics/AbcSize:
Max: 35
Metrics/CyclomaticComplexity:
Max: 10
Metrics/PerceivedComplexity:
Max: 10
Metrics/BlockLength:
Enabled: true
Exclude:
- lib/**/*.rake
- spec/**/*
- config/routes.rb
- config/initializers/simple_form_bootstrap.rb
Layout/LineLength:
Enabled: true
Max: 110
Metrics/MethodLength:
Enabled: true
Max: 15
Exclude:
- db/migrate/*.rb
# We rely on foreign key constraints to raise errors in some cases, instead
# of using restrict_with_exception.
Rails/HasManyOrHasOneDependent:
Enabled: false
Rails/NotNullColumn:
Enabled: false
Rails/SkipsModelValidations:
Enabled: false
Style/AsciiComments:
Enabled: false
Style/Documentation:
Exclude:
- "app/controllers/**/*"
- "app/decorators/**/*"
- "app/helpers/**/*"
- "app/policies/**/*"
- "app/serializers/**/*"
- "db/migrate/*.rb"
Style/EmptyMethod:
EnforcedStyle: expanded
# Sometimes using a series of if/unless blocks in parallel structure is good for readability.
Style/GuardClause:
Enabled: false
Bundler:
Enabled: true
Rails:
Enabled: true