-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.rubocop.yml
159 lines (145 loc) · 3.41 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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
require:
- rubocop-performance
- rubocop-rails
- rubocop-rspec
# Rails and ActiveRecord autogenerate a lot of code that fails Rubocop
# (I find this mildly confusing/annoying). Also, there's no point in
# having Rubocop look at JavaScript, images, shell scripts, etc.
AllCops:
EnabledByDefault: true
Exclude:
- db/**/*
- bin/*
- app/assets/**/*
- coverage/**/*
- docs/*
- log/*
- node_modules/**/*
- public/**/*
- tmp/**/*
- tools/**/*
- '**/vendor/**/*' # since we `bundle install --path vendor/bundle` on CI
# Spec files and the routes file are supposed to be one long block. Shush.
Metrics/BlockLength:
Exclude:
- Gemfile
- spec/**/*.rb
- config/routes.rb
- config/environments/*
- lib/tasks/*.rake
# This set of tests use IP addresses for good reasons
Style/IpAddresses:
Exclude:
- spec/features/ip_restrictions_spec.rb
# This might be worth enabling at some point?
Bundler/GemVersion:
Enabled: false
# Allow read access to ENV
Rails/EnvironmentVariableAccess:
AllowReads: true
# Whitespace Considered Helpful
Layout/ExtraSpacing:
Enabled: false
Layout/RedundantLineBreak:
Enabled: false
Layout/SpaceInsideArrayLiteralBrackets:
Enabled: false
Layout/SpaceInsideBlockBraces:
Enabled: false
Layout/SpaceInsideHashLiteralBraces:
Enabled: false
Layout/SpaceInsideParens:
Enabled: false
Layout/SpaceInsidePercentLiteralDelimiters:
Enabled: false
Layout/SpaceInsideReferenceBrackets:
Enabled: false
# Whut? No.
Layout/SpaceBeforeBrackets:
Enabled: false
# I'd rather use one style of regex everywhere, that is clearer for munging URLs
# as no need to escape '/': %r{/(path)/parts/} rather than /\/(path)\/parts\//
# Style/RegexpLiteral:
# Enabled: false
# I have no idea what this is but it was annoying me.
Style/FrozenStringLiteralComment:
Enabled: false
# ... nah
Bundler/GemComment:
Enabled: false
Layout/MultilineMethodArgumentLineBreaks:
Enabled: false
Lint/ConstantResolution:
Enabled: false
Lint/NumberConversion:
Enabled: false
Style/Copyright:
Enabled: false
Style/DocumentationMethod:
Enabled: false
Style/InlineComment:
Enabled: false
Style/MethodCallWithArgsParentheses:
Enabled: false
Style/MissingElse:
Enabled: false
Style/StringHashKeys:
Enabled: false
# TODO: Fix this stuff
Layout/ArgumentAlignment:
Enabled: false
Layout/ClosingParenthesisIndentation:
Enabled: false
Layout/CommentIndentation:
Enabled: false
Layout/EmptyLinesAroundBlockBody:
Enabled: false
Layout/FirstArgumentIndentation:
Enabled: false
Layout/FirstHashElementIndentation:
Enabled: false
Layout/HashAlignment:
Enabled: false
Layout/IndentationWidth:
Enabled: false
Layout/LineLength:
Enabled: false
Layout/SpaceAroundOperators:
Enabled: false
Layout/TrailingWhitespace:
Enabled: false
Metrics/AbcSize:
Enabled: false
Naming/FileName:
Enabled: false
Style/AndOr:
Enabled: false
Style/CaseEquality:
Enabled: false
Style/ClassAndModuleChildren:
Enabled: false
Style/Documentation:
Enabled: false
Style/ExpandPathArguments:
Enabled: false
Style/GuardClause:
Enabled: false
Style/HashSyntax:
Enabled: false
Style/ImplicitRuntimeError:
Enabled: false
Style/NegatedIf:
Enabled: false
Style/StringLiterals:
Enabled: false
Rails/SaveBang:
Enabled: false
Rails/Validation:
Enabled: false
RSpec/ExampleLength:
Max: 15
RSpec/MultipleExpectations:
Max: 5
RSpec/AnyInstance:
Exclude:
- 'spec/requests/items_spec.rb'