-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.rubocop.yml
120 lines (94 loc) · 2.4 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
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
inherit_gem:
prettier: rubocop.yml
require:
- rubocop-rails
- rubocop-rspec
- rubocop-performance
- rubocop-capybara
AllCops:
Exclude:
- Gemfile*
- bin/*
- gemfiles/**/*
- vendor/bundle/**/*
- docker/**/*
# Automatically enables new cops so that we only have to add them to
# edit default behavior
NewCops: enable
Rails:
Enabled: true
Style/NumericLiterals:
Exclude:
- schema.rb
RSpec/FilePath:
Enabled: false
# We don't care about method length, since we check method cyclomatic complexity.
Metrics/ClassLength:
Enabled: false
Metrics/BlockLength:
Enabled: false
Metrics/MethodLength:
Enabled: false
Layout/LineLength:
Enabled: false
Naming/FileName:
Exclude: ["devise-security.gemspec"]
Rails/DuplicateAssociation:
Enabled: false
Style/ConditionalAssignment:
Enabled: false
Style/NegatedIf:
Enabled: false
Style/GuardClause:
Enabled: false
Style/SymbolArray:
EnforcedStyle: brackets
# Trailing commas make for clearer diffs because the last line won't appear
# to have been changed, as it would if it lacked a comma and had one added.
Style/TrailingCommaInArrayLiteral:
EnforcedStyleForMultiline: comma
Style/TrailingCommaInHashLiteral:
EnforcedStyleForMultiline: comma
Style/TrailingCommaInArguments:
EnforcedStyleForMultiline: comma
# Cop supports --auto-correct.
# Configuration parameters: PreferredDelimiters.
Style/PercentLiteralDelimiters:
PreferredDelimiters:
# Using `[]` for string arrays instead of `()`, since normal arrays are
# indicated with `[]` not `()`.
"%w": "[]"
"%W": "[]"
Style/AndOr:
# Whether `and` and `or` are banned only in conditionals (conditionals)
# or completely (always).
# They read better, more like normal English.
Enabled: false
Style/HashEachMethods:
Enabled: true
Style/HashTransformKeys:
Enabled: true
Style/HashTransformValues:
Enabled: true
Style/HashSyntax:
EnforcedShorthandSyntax: either
# No one cares for these
Style/Documentation:
Enabled: false
Style/FrozenStringLiteralComment:
Enabled: false
SafeAutoCorrect: false
Style/ClassAndModuleChildren:
Enabled: false
Metrics/AbcSize:
CountRepeatedAttributes: false
Max: 22
Exclude:
- db/migrate/**/*.rb # mostly create table blocks
- db/migrate/*.rb # mostly create table blocks
Style/RedundantReturn:
Enabled: false
Lint/UnusedMethodArgument:
Enabled: false
Style/NumericLiterals:
Enabled: false