-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy path.rubocop.yml
157 lines (122 loc) · 3.29 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
AllCops:
DisplayCopNames: true
Exclude:
- 'db/**/*.rb'
- 'vendor/**/*'
- 'lib/wp_data.rb'
- 'app/models/search_builder.rb'
- 'app/assets/stylesheets/timeline.css'
# ignoring until we can sort out ruby parser version issue with rubocop (defaults to 2.0 parser, but newer parser versions show 400+ violations)
- 'app/models/exhibit.rb'
- 'app/helpers/snippet_helper.rb'
- 'app/controllers/snippets_controller.rb'
- 'app/models/link_exhibit.rb'
Metrics/ClassLength:
Enabled: false
Style/RegexpLiteral:
Enabled: false
Style/RaiseArgs:
Enabled: false
# method calls on an 'end' after a block
# we do this a lot, so leaving it
Style/MultilineBlockChain:
Enabled: false
Style/Documentation:
Enabled: false
# New Disables
Metrics/LineLength:
Enabled: false
Metrics/MethodLength:
Enabled: false
Metrics/LineLength:
Enabled: false
Metrics/MethodLength:
Enabled: false
Metrics/ClassLength:
Enabled: false
Style/AlignHash:
Enabled: false
Style/HashSyntax:
Enabled: false
Style/LineEndConcatenation:
Enabled: false
Style/StringLiterals:
Enabled: false
Style/IndentArray:
Enabled: false
Style/SpaceInsideStringInterpolation:
Enabled: false
# agree with the style for this one, but using && in a controller:
# redirect_to '/' && return unless @document
# redirect_to '/' and return unless @document
# does not result in a redirect
Style/AndOr:
Enabled: false
Lint/EndAlignment:
Enabled: false
# this was set with a gigantic maximum.... so disabling
Metrics/AbcSize:
Enabled: false
# got a lotta these
Style/GlobalVars:
Enabled: false
# too opinionated
# Offense count: 12
Metrics/CyclomaticComplexity:
Enabled: false
# Leaving these for now, not sure if this is a problem
# Offense count: 10
Metrics/PerceivedComplexity:
Max: 20
Style/ClassAndModuleChildren:
Exclude:
- 'config/environment.rb'
# Offense count: 1
# Configuration parameters: MinBodyLength.
Style/GuardClause:
Exclude:
- 'spec/support/remote_ip_monkey_patch.rb'
# Offense count: 2
Lint/ShadowingOuterLocalVariable:
Exclude:
- 'config/environment.rb'
# assuming theres some reason for this one
# Offense count: 1
# Configuration parameters: AllowSafeAssignment.
Lint/AssignmentInCondition:
Exclude:
- 'bin/spring'
# good security reason for cop, but apparently useful in this context?
# Offense count: 1
Lint/Eval:
Exclude:
- 'app/controllers/api_controller.rb'
# outta the box
# Offense count: 2
Lint/HandleExceptions:
Exclude:
- 'bin/rails'
- 'bin/rake'
# Offense count: 1
Lint/UselessAssignment:
Exclude:
- 'config/environment.rb'
Lint/IneffectiveAccessModifier:
Exclude:
- 'app/models/featured.rb'
- 'scripts/lib/cleaner.rb'
# Offense count: 1
Style/AsciiComments:
Exclude:
- 'spec/lib/markdown_spec.rb'
# Disable this. str.downcase != other_str is fine and clearer than
# str.casecmp(other_str) != 0 with very minimal performance hit.
Performance/Casecmp:
Enabled: false
# Use judgement. Using {...} delimiters for multi-line is considered OK if
# the block returns something as opposed having some kind of side effect, e.g.
# For example, #map can use {...} even when multiline.
# Also, some innocent method chaining appended to a do...end block is sometimes
# clearer than the alternative.
Style/BlockDelimiters:
Enabled: false