forked from pupilfirst/pupilfirst
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.rubocop.yml
85 lines (78 loc) · 2.28 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
AllCops:
TargetRubyVersion: 2.6
Exclude:
- 'db/**/*'
- "tmp/**/*"
- "log/**/*"
- 'node_modules/**/*'
# Rails specific
require: rubocop-rails
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/ParameterAlignment:
EnforcedStyle: with_fixed_indentation
Layout/ArgumentAlignment:
EnforcedStyle: with_fixed_indentation
Layout/MultilineOperationIndentation:
EnforcedStyle: indented
Layout/MultilineMethodCallIndentation:
EnforcedStyle: indented
Layout/CaseIndentation:
EnforcedStyle: end
IndentOneStep: true
Layout/EndAlignment:
EnforcedStyleAlignWith: variable
Layout/LineLength:
Enabled: false
Naming/VariableNumber:
Enabled: false
Metrics/BlockLength:
Exclude:
- 'app/admin/**/*'
- 'spec/**/*_spec.rb'
- 'config/**/*'
- 'spec/factories/*'
Lint/ShadowingOuterLocalVariable: # shadowing is a language feature - we should use it where appropriate.
Enabled: false
Style/HashEachMethods:
Enabled: true
Style/HashTransformKeys:
Enabled: true
Style/HashTransformValues:
Enabled: true
# Concessions (remove these if possible / appropriate).
Layout/EmptyLinesAroundAccessModifier:
Enabled: false # TODO: Enable this once it stops begin buggy. https://github.com/rubocop-hq/rubocop/issues/7212
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/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.
Style/StringLiterals:
Enabled: false
Style/Documentation:
Enabled: false
Layout/RescueEnsureAlignment:
Enabled: false # buggy