forked from pupilfirst/pupilfirst
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.rubocop.yml
71 lines (65 loc) · 1.77 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
AllCops:
TargetRubyVersion: 2.6
Exclude:
- 'db/**/*'
- "tmp/**/*"
- "log/**/*"
- 'node_modules/**/*'
# Rails specific
Rails:
Enabled: true
Rails/OutputSafety:
Enabled: false # This disallows .html_safe
Rails/TimeZone:
Enabled: false # This enforces Time.zone.now
Rails/Date:
Enabled: false # This enforces Time.zone.today
Rails/HasAndBelongsToMany:
Enabled: false # This disallows HABTM.
# Project styling
Style/IfUnlessModifier:
Enabled: false
Style/FormatStringToken:
Enabled: false
Style/DoubleNegation:
Enabled: false
Layout/AlignParameters:
EnforcedStyle: with_fixed_indentation
Layout/MultilineOperationIndentation:
EnforcedStyle: indented
Layout/MultilineMethodCallIndentation:
EnforcedStyle: indented
Layout/CaseIndentation:
EnforcedStyle: end
IndentOneStep: true
Layout/EndAlignment:
EnforcedStyleAlignWith: variable
Naming/VariableNumber:
Enabled: false
Metrics/BlockLength:
Exclude:
- 'app/admin/**/*'
- 'spec/**/*_spec.rb'
- 'config/**/*'
- 'spec/factories/*'
# Concessions (remove these if possible / appropriate).
Bundler/OrderedGems:
Enabled: false # we have a ton of gems, grouped arbitrarily. Could be tackled later.
Style/FrozenStringLiteralComment:
Enabled: false # forces addition of frozen string literal directive to all files. WTF.
Metrics/LineLength:
Max: 320 # default was 80.
StringLiterals:
Enabled: false
Documentation:
Enabled: false
Metrics/MethodLength:
Max: 20 # default was 10.
Metrics/ClassLength:
Max: 500 # default was 100.
Metrics/AbcSize:
Max: 30 # default is 15.
Style/GuardClause:
Enabled: false # this thing is annoying, and can lead to not-as-readable code.
Style/YodaCondition:
Enabled: false # buggy - sometimes complains about fixed code, and autocorrect doesn't work.