bugsnag 6.12.0 → 6.14.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (126) hide show
  1. checksums.yaml +4 -4
  2. data/.buildkite/pipeline.yml +470 -0
  3. data/.rubocop.yml +55 -0
  4. data/.rubocop_todo.yml +530 -160
  5. data/CHANGELOG.md +67 -0
  6. data/CONTRIBUTING.md +1 -9
  7. data/Gemfile +14 -7
  8. data/TESTING.md +81 -0
  9. data/VERSION +1 -1
  10. data/docker-compose.yml +46 -0
  11. data/dockerfiles/Dockerfile.jruby-unit-tests +13 -0
  12. data/dockerfiles/Dockerfile.ruby-maze-runner +26 -0
  13. data/dockerfiles/Dockerfile.ruby-unit-tests +12 -0
  14. data/features/delayed_job.feature +6 -22
  15. data/features/fixtures/delayed_job/Dockerfile +2 -4
  16. data/features/fixtures/delayed_job/app/Gemfile +1 -1
  17. data/features/fixtures/delayed_job/app/Rakefile +18 -0
  18. data/features/fixtures/docker-compose.yml +28 -40
  19. data/features/fixtures/expected_breadcrumbs/active_job.json +9 -0
  20. data/features/fixtures/expected_breadcrumbs/mongo_failed.json +15 -0
  21. data/features/fixtures/expected_breadcrumbs/mongo_filtered_request.json +15 -0
  22. data/features/fixtures/expected_breadcrumbs/mongo_filtered_result.json +15 -0
  23. data/features/fixtures/expected_breadcrumbs/mongo_success.json +14 -0
  24. data/features/fixtures/expected_breadcrumbs/request.json +13 -0
  25. data/features/fixtures/expected_breadcrumbs/sql_with_bindings.json +12 -0
  26. data/features/fixtures/expected_breadcrumbs/sql_without_bindings.json +11 -0
  27. data/features/fixtures/plain/Dockerfile +2 -2
  28. data/features/fixtures/plain/app/app.rb +1 -3
  29. data/features/fixtures/plain/app/delivery/fork_threadpool.rb +3 -1
  30. data/features/fixtures/plain/app/unhandled/{Interrupt.rb → interrupt.rb} +0 -0
  31. data/features/fixtures/rack1/Dockerfile +2 -2
  32. data/features/fixtures/rack2/Dockerfile +2 -2
  33. data/features/fixtures/rails3/Dockerfile +2 -2
  34. data/features/fixtures/rails3/app/Gemfile +4 -0
  35. data/features/fixtures/rails3/app/config/initializers/bugsnag.rb +3 -2
  36. data/features/fixtures/rails4/Dockerfile +2 -5
  37. data/features/fixtures/rails4/app/config/initializers/bugsnag.rb +2 -1
  38. data/features/fixtures/rails5/Dockerfile +2 -2
  39. data/features/fixtures/rails5/app/Gemfile +3 -2
  40. data/features/fixtures/rails5/app/config/initializers/bugsnag.rb +2 -1
  41. data/features/fixtures/rails6/Dockerfile +2 -2
  42. data/features/fixtures/rails6/app/Gemfile +3 -2
  43. data/features/fixtures/rails6/app/app/controllers/mongo_controller.rb +22 -0
  44. data/features/fixtures/rails6/app/app/models/mongo_model.rb +6 -0
  45. data/features/fixtures/rails6/app/config/environments/development.rb +2 -0
  46. data/features/fixtures/rails6/app/config/environments/production.rb +1 -0
  47. data/features/fixtures/rails6/app/config/environments/rails_env.rb +1 -0
  48. data/features/fixtures/rails6/app/config/environments/test.rb +1 -0
  49. data/features/fixtures/rails6/app/config/initializers/bugsnag.rb +2 -1
  50. data/features/fixtures/rails6/app/config/mongoid.yml +23 -0
  51. data/features/fixtures/rails6/app/config/routes.rb +4 -0
  52. data/features/fixtures/resque/Dockerfile +2 -2
  53. data/features/fixtures/sidekiq/Dockerfile +5 -7
  54. data/features/fixtures/sidekiq/app/Gemfile +2 -1
  55. data/features/fixtures/sidekiq/app/Rakefile.rb +14 -0
  56. data/features/fixtures/sinatra1/Dockerfile +2 -2
  57. data/features/fixtures/sinatra2/Dockerfile +2 -2
  58. data/features/plain_features/add_tab.feature +24 -97
  59. data/features/plain_features/app_type.feature +6 -25
  60. data/features/plain_features/app_version.feature +6 -25
  61. data/features/plain_features/auto_notify.feature +4 -20
  62. data/features/plain_features/delivery.feature +12 -60
  63. data/features/plain_features/exception_data.feature +24 -94
  64. data/features/plain_features/filters.feature +9 -43
  65. data/features/plain_features/handled_errors.feature +16 -78
  66. data/features/plain_features/ignore_classes.feature +5 -23
  67. data/features/plain_features/ignore_report.feature +6 -24
  68. data/features/plain_features/proxies.feature +13 -56
  69. data/features/plain_features/release_stages.feature +9 -40
  70. data/features/plain_features/report_api_key.feature +9 -35
  71. data/features/plain_features/report_severity.feature +8 -35
  72. data/features/plain_features/report_stack_frames.feature +24 -92
  73. data/features/plain_features/report_user.feature +23 -96
  74. data/features/plain_features/unhandled_errors.feature +17 -88
  75. data/features/rails_features/api_key.feature +12 -58
  76. data/features/rails_features/app_type.feature +13 -58
  77. data/features/rails_features/app_version.feature +19 -80
  78. data/features/rails_features/auto_capture_sessions.feature +31 -112
  79. data/features/rails_features/auto_notify.feature +28 -105
  80. data/features/rails_features/before_notify.feature +18 -83
  81. data/features/rails_features/breadcrumbs.feature +40 -137
  82. data/features/rails_features/handled.feature +18 -82
  83. data/features/rails_features/ignore_classes.feature +12 -51
  84. data/features/rails_features/meta_data_filters.feature +9 -33
  85. data/features/rails_features/mongo_breadcrumbs.feature +22 -96
  86. data/features/rails_features/project_root.feature +19 -84
  87. data/features/rails_features/release_stage.feature +20 -82
  88. data/features/rails_features/send_code.feature +13 -55
  89. data/features/rails_features/send_environment.feature +7 -33
  90. data/features/rails_features/unhandled.feature +6 -31
  91. data/features/rails_features/user_info.feature +27 -65
  92. data/features/sidekiq.feature +12 -79
  93. data/features/steps/ruby_notifier_steps.rb +59 -15
  94. data/features/support/env.rb +12 -45
  95. data/lib/bugsnag.rb +74 -21
  96. data/lib/bugsnag/breadcrumbs/breadcrumbs.rb +0 -2
  97. data/lib/bugsnag/breadcrumbs/validator.rb +0 -6
  98. data/lib/bugsnag/cleaner.rb +129 -60
  99. data/lib/bugsnag/configuration.rb +31 -2
  100. data/lib/bugsnag/helpers.rb +2 -4
  101. data/lib/bugsnag/integrations/que.rb +7 -4
  102. data/lib/bugsnag/integrations/railtie.rb +1 -1
  103. data/lib/bugsnag/middleware/discard_error_class.rb +30 -0
  104. data/lib/bugsnag/middleware/exception_meta_data.rb +15 -9
  105. data/lib/bugsnag/middleware/ignore_error_class.rb +2 -0
  106. data/lib/bugsnag/middleware/rack_request.rb +2 -4
  107. data/lib/bugsnag/report.rb +3 -13
  108. data/lib/bugsnag/stacktrace.rb +6 -10
  109. data/spec/breadcrumbs/breadcrumb_spec.rb +1 -1
  110. data/spec/breadcrumbs/validator_spec.rb +1 -26
  111. data/spec/bugsnag_spec.rb +2 -2
  112. data/spec/cleaner_spec.rb +202 -10
  113. data/spec/configuration_spec.rb +16 -1
  114. data/spec/fixtures/apps/rails-initializer-config/Gemfile +5 -1
  115. data/spec/fixtures/apps/rails-invalid-initializer-config/Gemfile +5 -1
  116. data/spec/fixtures/apps/rails-no-config/Gemfile +5 -1
  117. data/spec/helper_spec.rb +0 -31
  118. data/spec/integrations/logger_spec.rb +1 -1
  119. data/spec/integrations/rack_spec.rb +8 -6
  120. data/spec/integrations/rake_spec.rb +1 -1
  121. data/spec/report_spec.rb +324 -26
  122. data/spec/spec_helper.rb +6 -1
  123. data/spec/stacktrace_spec.rb +179 -72
  124. metadata +23 -7
  125. data/.travis.yml +0 -117
  126. data/features/plain_features/api_key.feature +0 -25
@@ -1,2 +1,57 @@
1
1
  inherit_from: .rubocop_todo.yml
2
2
 
3
+ AllCops:
4
+ Exclude:
5
+ - 'bin/**/*'
6
+ - 'example/**/*'
7
+ - 'spec/fixtures/**/*'
8
+ - 'features/fixtures/**/*'
9
+
10
+ # We can't use ".freeze" on our constants in case users are monkey patching
11
+ # them — this would be a BC break
12
+ Style/MutableConstant:
13
+ Enabled: false
14
+
15
+ Layout/EmptyLinesAroundAttributeAccessor:
16
+ Enabled: true
17
+
18
+ Layout/SpaceAroundMethodCallOperator:
19
+ Enabled: true
20
+
21
+ Lint/RaiseException:
22
+ Enabled: true
23
+
24
+ Lint/StructNewOverride:
25
+ Enabled: true
26
+
27
+ Lint/DeprecatedOpenSSLConstant:
28
+ Enabled: true
29
+
30
+ Lint/MixedRegexpCaptureTypes:
31
+ Enabled: true
32
+
33
+ Style/RedundantFetchBlock:
34
+ Enabled: true
35
+
36
+ Style/ExponentialNotation:
37
+ Enabled: false
38
+
39
+ Style/HashEachMethods:
40
+ Enabled: true
41
+
42
+ Style/RedundantRegexpCharacterClass:
43
+ Enabled: true
44
+
45
+ Style/RedundantRegexpEscape:
46
+ Enabled: true
47
+
48
+ # These require newer version of Ruby than our minimum supported version, so
49
+ # have to be disabled
50
+ Style/HashTransformKeys: # Requires Ruby 2.5
51
+ Enabled: false
52
+
53
+ Style/HashTransformValues: # Requires Ruby 2.4
54
+ Enabled: false
55
+
56
+ Style/SlicingWithRange: # Requires Ruby 2.6
57
+ Enabled: false
@@ -1,11 +1,40 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2018-02-06 11:17:57 +0000 using RuboCop version 0.52.1.
3
+ # on 2020-05-15 11:35:58 +0100 using RuboCop version 0.83.0.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
+ # Offense count: 3
10
+ # Configuration parameters: Include.
11
+ # Include: **/*.gemfile, **/Gemfile, **/gems.rb
12
+ Bundler/DuplicatedGem:
13
+ Exclude:
14
+ - 'Gemfile'
15
+
16
+ # Offense count: 5
17
+ # Cop supports --auto-correct.
18
+ # Configuration parameters: TreatCommentsAsGroupSeparators, Include.
19
+ # Include: **/*.gemfile, **/Gemfile, **/gems.rb
20
+ Bundler/OrderedGems:
21
+ Exclude:
22
+ - 'Gemfile'
23
+
24
+ # Offense count: 1
25
+ # Configuration parameters: Include.
26
+ # Include: **/*.gemspec
27
+ Gemspec/RequiredRubyVersion:
28
+ Exclude:
29
+ - 'bugsnag.gemspec'
30
+
31
+ # Offense count: 2
32
+ # Cop supports --auto-correct.
33
+ Layout/BlockEndNewline:
34
+ Exclude:
35
+ - 'spec/integrations/mongo_spec.rb'
36
+ - 'spec/report_spec.rb'
37
+
9
38
  # Offense count: 4
10
39
  # Cop supports --auto-correct.
11
40
  # Configuration parameters: EnforcedStyle, IndentOneStep, IndentationWidth.
@@ -14,16 +43,45 @@ Layout/CaseIndentation:
14
43
  Exclude:
15
44
  - 'lib/bugsnag/cleaner.rb'
16
45
 
17
- # Offense count: 3
46
+ # Offense count: 15
47
+ # Cop supports --auto-correct.
48
+ Layout/EmptyLineAfterGuardClause:
49
+ Exclude:
50
+ - 'lib/bugsnag.rb'
51
+ - 'lib/bugsnag/cleaner.rb'
52
+ - 'lib/bugsnag/delivery/thread_queue.rb'
53
+ - 'lib/bugsnag/helpers.rb'
54
+ - 'lib/bugsnag/session_tracker.rb'
55
+
56
+ # Offense count: 10
57
+ # Cop supports --auto-correct.
58
+ Layout/EmptyLineAfterMagicComment:
59
+ Exclude:
60
+ - 'spec/breadcrumbs/validator_spec.rb'
61
+ - 'spec/bugsnag_spec.rb'
62
+ - 'spec/configuration_spec.rb'
63
+ - 'spec/integrations/mongo_spec.rb'
64
+ - 'spec/integrations/que_spec.rb'
65
+ - 'spec/integrations/resque_spec.rb'
66
+ - 'spec/integrations/shoryuken_spec.rb'
67
+ - 'spec/middleware/exception_meta_data_spec.rb'
68
+ - 'spec/report_spec.rb'
69
+ - 'spec/session_tracker_spec.rb'
70
+
71
+ # Offense count: 5
18
72
  # Cop supports --auto-correct.
19
73
  Layout/EmptyLines:
20
74
  Exclude:
75
+ - 'features/steps/ruby_notifier_steps.rb'
21
76
  - 'lib/bugsnag/helpers.rb'
22
77
  - 'lib/bugsnag/integrations/mailman.rb'
23
78
  - 'lib/bugsnag/stacktrace.rb'
79
+ - 'spec/integrations/mailman_spec.rb'
24
80
 
25
81
  # Offense count: 4
26
82
  # Cop supports --auto-correct.
83
+ # Configuration parameters: EnforcedStyle.
84
+ # SupportedStyles: around, only_before
27
85
  Layout/EmptyLinesAroundAccessModifier:
28
86
  Exclude:
29
87
  - 'lib/bugsnag/delivery.rb'
@@ -31,25 +89,38 @@ Layout/EmptyLinesAroundAccessModifier:
31
89
  - 'lib/bugsnag/middleware_stack.rb'
32
90
  - 'lib/bugsnag/session_tracker.rb'
33
91
 
34
- # Offense count: 1
92
+ # Offense count: 2
93
+ # Cop supports --auto-correct.
94
+ Layout/EmptyLinesAroundAttributeAccessor:
95
+ Exclude:
96
+ - 'lib/bugsnag/configuration.rb'
97
+ - 'spec/report_spec.rb'
98
+
99
+ # Offense count: 24
35
100
  # Cop supports --auto-correct.
36
101
  # Configuration parameters: EnforcedStyle.
37
102
  # SupportedStyles: empty_lines, no_empty_lines
38
103
  Layout/EmptyLinesAroundBlockBody:
39
104
  Exclude:
40
105
  - 'lib/bugsnag/middleware/classify_error.rb'
41
-
42
- # Offense count: 11
106
+ - 'spec/bugsnag_spec.rb'
107
+ - 'spec/helper_spec.rb'
108
+ - 'spec/integration_spec.rb'
109
+ - 'spec/integrations/logger_spec.rb'
110
+ - 'spec/integrations/rack_spec.rb'
111
+ - 'spec/integrations/rails3_request_spec.rb'
112
+ - 'spec/middleware_spec.rb'
113
+ - 'spec/report_spec.rb'
114
+
115
+ # Offense count: 9
43
116
  # Cop supports --auto-correct.
44
117
  # Configuration parameters: EnforcedStyle.
45
- # SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines
118
+ # SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines, beginning_only, ending_only
46
119
  Layout/EmptyLinesAroundClassBody:
47
120
  Exclude:
48
- - 'lib/bugsnag/integrations/delayed_job.rb'
49
121
  - 'lib/bugsnag/integrations/mailman.rb'
50
122
  - 'lib/bugsnag/integrations/rack.rb'
51
123
  - 'lib/bugsnag/integrations/railtie.rb'
52
- - 'lib/bugsnag/integrations/rake.rb'
53
124
  - 'lib/bugsnag/integrations/resque.rb'
54
125
  - 'lib/bugsnag/integrations/shoryuken.rb'
55
126
  - 'lib/bugsnag/integrations/sidekiq.rb'
@@ -57,12 +128,6 @@ Layout/EmptyLinesAroundClassBody:
57
128
  - 'lib/bugsnag/session_tracker.rb'
58
129
  - 'lib/bugsnag/stacktrace.rb'
59
130
 
60
- # Offense count: 1
61
- # Cop supports --auto-correct.
62
- Layout/EmptyLinesAroundExceptionHandlingKeywords:
63
- Exclude:
64
- - 'lib/bugsnag/integrations/rake.rb'
65
-
66
131
  # Offense count: 1
67
132
  # Cop supports --auto-correct.
68
133
  # Configuration parameters: EnforcedStyle.
@@ -71,26 +136,54 @@ Layout/EmptyLinesAroundModuleBody:
71
136
  Exclude:
72
137
  - 'lib/bugsnag/integrations/rails/controller_methods.rb'
73
138
 
139
+ # Offense count: 2
140
+ # Cop supports --auto-correct.
141
+ # Configuration parameters: EnforcedStyleAlignWith, AutoCorrect, Severity.
142
+ # SupportedStylesAlignWith: keyword, variable, start_of_line
143
+ Layout/EndAlignment:
144
+ Exclude:
145
+ - 'lib/bugsnag/cleaner.rb'
146
+
74
147
  # Offense count: 1
75
148
  # Cop supports --auto-correct.
149
+ # Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment.
150
+ Layout/ExtraSpacing:
151
+ Exclude:
152
+ - 'Rakefile'
153
+
154
+ # Offense count: 7
155
+ # Cop supports --auto-correct.
76
156
  # Configuration parameters: EnforcedStyle, IndentationWidth.
77
157
  # SupportedStyles: special_inside_parentheses, consistent, align_brackets
78
- Layout/IndentArray:
158
+ Layout/FirstArrayElementIndentation:
79
159
  Exclude:
80
160
  - 'lib/bugsnag/middleware/classify_error.rb'
161
+ - 'spec/report_spec.rb'
162
+ - 'spec/stacktrace_spec.rb'
81
163
 
82
- # Offense count: 12
164
+ # Offense count: 164
83
165
  # Cop supports --auto-correct.
84
166
  # Configuration parameters: IndentationWidth.
85
167
  # SupportedStyles: special_inside_parentheses, consistent, align_braces
86
- Layout/IndentHash:
168
+ Layout/FirstHashElementIndentation:
87
169
  EnforcedStyle: consistent
88
170
 
171
+ # Offense count: 2
172
+ # Cop supports --auto-correct.
173
+ # Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
174
+ # SupportedHashRocketStyles: key, separator, table
175
+ # SupportedColonStyles: key, separator, table
176
+ # SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
177
+ Layout/HashAlignment:
178
+ Exclude:
179
+ - 'lib/bugsnag/delivery/synchronous.rb'
180
+ - 'spec/integrations/rake_spec.rb'
181
+
89
182
  # Offense count: 1
90
183
  # Cop supports --auto-correct.
91
184
  # Configuration parameters: EnforcedStyle.
92
- # SupportedStyles: auto_detection, squiggly, active_support, powerpack, unindent
93
- Layout/IndentHeredoc:
185
+ # SupportedStyles: squiggly, active_support, powerpack, unindent
186
+ Layout/HeredocIndentation:
94
187
  Exclude:
95
188
  - 'lib/generators/bugsnag/bugsnag_generator.rb'
96
189
 
@@ -101,11 +194,23 @@ Layout/IndentationWidth:
101
194
  Exclude:
102
195
  - 'lib/bugsnag/cleaner.rb'
103
196
 
104
- # Offense count: 2
197
+ # Offense count: 6
198
+ # Cop supports --auto-correct.
199
+ # Configuration parameters: AllowDoxygenCommentStyle, AllowGemfileRubyComment.
200
+ Layout/LeadingCommentSpace:
201
+ Exclude:
202
+ - 'spec/integration_spec.rb'
203
+ - 'spec/integrations/mailman_spec.rb'
204
+ - 'spec/integrations/que_spec.rb'
205
+ - 'spec/integrations/resque_spec.rb'
206
+
207
+ # Offense count: 4
105
208
  # Cop supports --auto-correct.
106
209
  Layout/MultilineBlockLayout:
107
210
  Exclude:
108
211
  - 'lib/bugsnag/middleware/classify_error.rb'
212
+ - 'spec/integrations/mongo_spec.rb'
213
+ - 'spec/report_spec.rb'
109
214
 
110
215
  # Offense count: 3
111
216
  # Cop supports --auto-correct.
@@ -124,7 +229,13 @@ Layout/SpaceAfterComma:
124
229
  - 'lib/bugsnag/middleware_stack.rb'
125
230
  - 'lib/bugsnag/report.rb'
126
231
 
127
- # Offense count: 5
232
+ # Offense count: 1
233
+ # Cop supports --auto-correct.
234
+ Layout/SpaceAfterNot:
235
+ Exclude:
236
+ - 'features/steps/ruby_notifier_steps.rb'
237
+
238
+ # Offense count: 9
128
239
  # Cop supports --auto-correct.
129
240
  # Configuration parameters: EnforcedStyle.
130
241
  # SupportedStyles: space, no_space
@@ -136,7 +247,20 @@ Layout/SpaceAroundEqualsInParameterDefault:
136
247
  - 'lib/bugsnag/integrations/rake.rb'
137
248
  - 'lib/bugsnag/report.rb'
138
249
 
139
- # Offense count: 2
250
+ # Offense count: 16
251
+ # Cop supports --auto-correct.
252
+ # Configuration parameters: AllowForAlignment, EnforcedStyleForExponentOperator.
253
+ # SupportedStylesForExponentOperator: space, no_space
254
+ Layout/SpaceAroundOperators:
255
+ Exclude:
256
+ - 'Gemfile'
257
+ - 'Rakefile'
258
+ - 'spec/bugsnag_spec.rb'
259
+ - 'spec/integrations/rake_spec.rb'
260
+ - 'spec/integrations/sidekiq_spec.rb'
261
+ - 'spec/report_spec.rb'
262
+
263
+ # Offense count: 89
140
264
  # Cop supports --auto-correct.
141
265
  # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
142
266
  # SupportedStyles: space, no_space
@@ -145,120 +269,178 @@ Layout/SpaceBeforeBlockBraces:
145
269
  Exclude:
146
270
  - 'lib/bugsnag/middleware/suggestion_data.rb'
147
271
  - 'lib/bugsnag/middleware_stack.rb'
148
-
149
- # Offense count: 23
272
+ - 'spec/bugsnag_spec.rb'
273
+ - 'spec/configuration_spec.rb'
274
+ - 'spec/helper_spec.rb'
275
+ - 'spec/integration_spec.rb'
276
+ - 'spec/integrations/mailman_spec.rb'
277
+ - 'spec/integrations/rack_spec.rb'
278
+ - 'spec/integrations/rake_spec.rb'
279
+ - 'spec/integrations/sidekiq_spec.rb'
280
+ - 'spec/middleware_spec.rb'
281
+ - 'spec/report_spec.rb'
282
+ - 'spec/session_tracker_spec.rb'
283
+ - 'spec/stacktrace_spec.rb'
284
+
285
+ # Offense count: 48
150
286
  # Cop supports --auto-correct.
151
287
  # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
152
288
  # SupportedStyles: space, no_space
153
289
  # SupportedStylesForEmptyBraces: space, no_space
154
290
  Layout/SpaceInsideBlockBraces:
155
- Exclude:
156
- - 'lib/bugsnag.rb'
157
- - 'lib/bugsnag/cleaner.rb'
158
- - 'lib/bugsnag/helpers.rb'
159
- - 'lib/bugsnag/integrations/shoryuken.rb'
160
- - 'lib/bugsnag/middleware/callbacks.rb'
161
- - 'lib/bugsnag/middleware/rack_request.rb'
162
- - 'lib/bugsnag/middleware/warden_user.rb'
163
- - 'lib/bugsnag/middleware_stack.rb'
164
- - 'lib/bugsnag/report.rb'
165
- - 'lib/bugsnag/stacktrace.rb'
291
+ Enabled: false
166
292
 
167
- # Offense count: 22
293
+ # Offense count: 162
168
294
  # Cop supports --auto-correct.
169
295
  # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
170
296
  # SupportedStyles: space, no_space, compact
171
297
  # SupportedStylesForEmptyBraces: space, no_space
172
298
  Layout/SpaceInsideHashLiteralBraces:
173
- Exclude:
174
- - 'lib/bugsnag.rb'
175
- - 'lib/bugsnag/cleaner.rb'
176
- - 'lib/bugsnag/integrations/resque.rb'
177
- - 'lib/bugsnag/middleware/exception_meta_data.rb'
178
- - 'lib/bugsnag/middleware/mailman.rb'
179
- - 'lib/bugsnag/middleware/suggestion_data.rb'
180
- - 'lib/bugsnag/middleware/warden_user.rb'
181
- - 'lib/bugsnag/report.rb'
182
- - 'lib/bugsnag/session_tracker.rb'
299
+ Enabled: false
183
300
 
184
- # Offense count: 2
301
+ # Offense count: 3
185
302
  # Cop supports --auto-correct.
303
+ # Configuration parameters: EnforcedStyle.
304
+ # SupportedStyles: space, no_space
186
305
  Layout/SpaceInsideParens:
187
306
  Exclude:
188
307
  - 'lib/bugsnag/stacktrace.rb'
308
+ - 'spec/integrations/shoryuken_spec.rb'
189
309
 
190
- # Offense count: 4
310
+ # Offense count: 8
191
311
  # Cop supports --auto-correct.
192
312
  # Configuration parameters: EnforcedStyle.
193
313
  # SupportedStyles: final_newline, final_blank_line
194
- Layout/TrailingBlankLines:
314
+ Layout/TrailingEmptyLines:
195
315
  Exclude:
196
- - 'lib/bugsnag/integrations/que.rb'
197
316
  - 'lib/bugsnag/session_tracker.rb'
198
317
  - 'lib/bugsnag/tasks.rb'
199
318
  - 'lib/bugsnag/version.rb'
319
+ - 'spec/breadcrumbs/breadcrumb_spec.rb'
320
+ - 'spec/breadcrumbs/validator_spec.rb'
321
+ - 'spec/middleware_stack_spec.rb'
322
+ - 'spec/spec_helper.rb'
323
+ - 'spec/utility/circular_buffer_spec.rb'
200
324
 
201
- # Offense count: 2
325
+ # Offense count: 5
326
+ # Cop supports --auto-correct.
327
+ # Configuration parameters: AllowInHeredoc.
328
+ Layout/TrailingWhitespace:
329
+ Exclude:
330
+ - 'spec/integrations/clearance_user_spec.rb'
331
+ - 'spec/integrations/que_spec.rb'
332
+ - 'spec/integrations/rake_spec.rb'
333
+ - 'spec/integrations/shoryuken_spec.rb'
334
+ - 'spec/integrations/warden_user_spec.rb'
335
+
336
+ # Offense count: 90
202
337
  Lint/AmbiguousBlockAssociation:
203
338
  Exclude:
204
339
  - 'lib/bugsnag/delivery/thread_queue.rb'
205
340
  - 'lib/bugsnag/middleware/suggestion_data.rb'
341
+ - 'spec/integrations/rack_spec.rb'
342
+ - 'spec/integrations/rails3_request_spec.rb'
343
+ - 'spec/integrations/sidekiq_spec.rb'
344
+ - 'spec/middleware_spec.rb'
345
+ - 'spec/report_spec.rb'
346
+ - 'spec/session_tracker_spec.rb'
347
+ - 'spec/stacktrace_spec.rb'
206
348
 
207
- # Offense count: 4
349
+ # Offense count: 3
208
350
  # Configuration parameters: AllowSafeAssignment.
209
351
  Lint/AssignmentInCondition:
210
352
  Exclude:
211
353
  - 'lib/bugsnag/delivery/thread_queue.rb'
212
354
  - 'lib/bugsnag/helpers.rb'
213
- - 'lib/bugsnag/integrations/delayed_job.rb'
214
355
 
215
356
  # Offense count: 2
216
- Lint/DuplicateMethods:
357
+ # Cop supports --auto-correct.
358
+ Lint/BooleanSymbol:
217
359
  Exclude:
218
- - 'lib/bugsnag/configuration.rb'
360
+ - 'spec/breadcrumbs/validator_spec.rb'
219
361
 
220
- # Offense count: 2
362
+ # Offense count: 15
363
+ Lint/IneffectiveAccessModifier:
364
+ Exclude:
365
+ - 'lib/bugsnag/helpers.rb'
366
+
367
+ # Offense count: 1
221
368
  # Cop supports --auto-correct.
222
- # Configuration parameters: EnforcedStyleAlignWith, AutoCorrect.
223
- # SupportedStylesAlignWith: keyword, variable, start_of_line
224
- Lint/EndAlignment:
369
+ # Configuration parameters: EnforcedStyle.
370
+ # SupportedStyles: runtime_error, standard_error
371
+ Lint/InheritException:
225
372
  Exclude:
226
- - 'lib/bugsnag/cleaner.rb'
373
+ - 'spec/report_spec.rb'
227
374
 
228
- # Offense count: 2
229
- Lint/HandleExceptions:
375
+ # Offense count: 1
376
+ # Cop supports --auto-correct.
377
+ Lint/ParenthesesAsGroupedExpression:
378
+ Exclude:
379
+ - 'spec/report_spec.rb'
380
+
381
+ # Offense count: 3
382
+ # Cop supports --auto-correct.
383
+ Lint/RedundantRequireStatement:
230
384
  Exclude:
231
385
  - 'lib/bugsnag.rb'
232
- - 'lib/bugsnag/tasks/bugsnag.rake'
386
+ - 'lib/bugsnag/delivery/thread_queue.rb'
387
+ - 'lib/bugsnag/session_tracker.rb'
233
388
 
234
- # Offense count: 10
235
- Lint/IneffectiveAccessModifier:
389
+ # Offense count: 1
390
+ # Cop supports --auto-correct.
391
+ Lint/RedundantStringCoercion:
236
392
  Exclude:
237
- - 'lib/bugsnag/helpers.rb'
393
+ - 'features/support/env.rb'
238
394
 
239
- # Offense count: 5
395
+ # Offense count: 12
240
396
  Lint/RescueException:
241
397
  Exclude:
398
+ - 'lib/bugsnag/integrations/delayed_job.rb'
242
399
  - 'lib/bugsnag/integrations/mailman.rb'
243
400
  - 'lib/bugsnag/integrations/rack.rb'
244
401
  - 'lib/bugsnag/integrations/rake.rb'
245
402
  - 'lib/bugsnag/integrations/shoryuken.rb'
246
403
  - 'lib/bugsnag/integrations/sidekiq.rb'
247
- - 'lib/bugsnag/integrations/delayed_job.rb'
404
+ - 'spec/middleware_spec.rb'
405
+ - 'spec/report_spec.rb'
406
+ - 'spec/stacktrace_spec.rb'
248
407
 
249
- # Offense count: 6
408
+ # Offense count: 1
409
+ # Cop supports --auto-correct.
410
+ Lint/SendWithMixinArgument:
411
+ Exclude:
412
+ - 'lib/bugsnag/integrations/rake.rb'
413
+
414
+ # Offense count: 2
415
+ # Configuration parameters: AllowComments.
416
+ Lint/SuppressedException:
417
+ Exclude:
418
+ - 'lib/bugsnag.rb'
419
+ - 'lib/bugsnag/tasks/bugsnag.rake'
420
+
421
+ # Offense count: 103
250
422
  # Cop supports --auto-correct.
251
423
  # Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
252
424
  Lint/UnusedBlockArgument:
253
425
  Exclude:
426
+ - 'features/support/env.rb'
254
427
  - 'lib/bugsnag/configuration.rb'
255
428
  - 'lib/bugsnag/helpers.rb'
256
429
  - 'lib/bugsnag/middleware_stack.rb'
257
430
  - 'lib/bugsnag/report.rb'
431
+ - 'spec/bugsnag_spec.rb'
432
+ - 'spec/helper_spec.rb'
433
+ - 'spec/integrations/rack_spec.rb'
434
+ - 'spec/integrations/rails3_request_spec.rb'
435
+ - 'spec/integrations/sidekiq_spec.rb'
436
+ - 'spec/middleware_spec.rb'
437
+ - 'spec/report_spec.rb'
438
+ - 'spec/session_tracker_spec.rb'
439
+ - 'spec/stacktrace_spec.rb'
258
440
 
259
441
  # Offense count: 3
260
442
  # Cop supports --auto-correct.
261
- # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods.
443
+ # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods.
262
444
  Lint/UnusedMethodArgument:
263
445
  Exclude:
264
446
  - 'lib/bugsnag.rb'
@@ -266,53 +448,59 @@ Lint/UnusedMethodArgument:
266
448
  - 'lib/bugsnag/integrations/sidekiq.rb'
267
449
 
268
450
  # Offense count: 1
451
+ # Cop supports --auto-correct.
269
452
  # Configuration parameters: ContextCreatingMethods, MethodCreatingMethods.
270
453
  Lint/UselessAccessModifier:
271
454
  Exclude:
272
455
  - 'lib/bugsnag/helpers.rb'
273
456
 
274
- # Offense count: 25
457
+ # Offense count: 4
458
+ Lint/UselessAssignment:
459
+ Exclude:
460
+ - 'features/steps/ruby_notifier_steps.rb'
461
+ - 'spec/breadcrumbs/breadcrumb_spec.rb'
462
+ - 'spec/session_tracker_spec.rb'
463
+
464
+ # Offense count: 33
465
+ # Configuration parameters: IgnoredMethods.
275
466
  Metrics/AbcSize:
276
- Max: 86
467
+ Max: 68
277
468
 
278
- # Offense count: 1
469
+ # Offense count: 74
279
470
  # Configuration parameters: CountComments, ExcludedMethods.
471
+ # ExcludedMethods: refine
280
472
  Metrics/BlockLength:
281
- Max: 30
473
+ Max: 1026
282
474
 
283
- # Offense count: 2
475
+ # Offense count: 1
284
476
  # Configuration parameters: CountBlocks.
285
477
  Metrics/BlockNesting:
286
478
  Max: 4
287
479
 
288
- # Offense count: 3
480
+ # Offense count: 4
289
481
  # Configuration parameters: CountComments.
290
482
  Metrics/ClassLength:
291
- Max: 149
292
- Exclude:
293
- - 'lib/bugsnag/report.rb'
294
- - 'lib/bugsnag/configuration.rb'
483
+ Max: 174
295
484
 
296
- # Offense count: 12
485
+ # Offense count: 15
486
+ # Configuration parameters: IgnoredMethods.
297
487
  Metrics/CyclomaticComplexity:
298
- Max: 19
488
+ Max: 18
299
489
 
300
- # Offense count: 34
301
- # Configuration parameters: CountComments.
490
+ # Offense count: 42
491
+ # Configuration parameters: CountComments, ExcludedMethods.
302
492
  Metrics/MethodLength:
303
- Max: 55
493
+ Max: 54
304
494
 
305
- # Offense count: 1
495
+ # Offense count: 3
306
496
  # Configuration parameters: CountComments.
307
497
  Metrics/ModuleLength:
308
- Max: 125
309
- Exclude:
310
- - 'lib/bugsnag/helpers.rb'
311
- - 'lib/bugsnag.rb'
498
+ Max: 152
312
499
 
313
- # Offense count: 11
500
+ # Offense count: 15
501
+ # Configuration parameters: IgnoredMethods.
314
502
  Metrics/PerceivedComplexity:
315
- Max: 21
503
+ Max: 20
316
504
 
317
505
  # Offense count: 2
318
506
  Naming/AccessorMethodName:
@@ -320,24 +508,57 @@ Naming/AccessorMethodName:
320
508
  - 'lib/bugsnag/session_tracker.rb'
321
509
 
322
510
  # Offense count: 1
323
- # Configuration parameters: Blacklist.
324
- # Blacklist: END, (?-mix:EO[A-Z]{1})
511
+ Naming/ConstantName:
512
+ Exclude:
513
+ - 'spec/integrations/que_spec.rb'
514
+
515
+ # Offense count: 1
516
+ # Configuration parameters: ForbiddenDelimiters.
517
+ # ForbiddenDelimiters: (?-mix:(^|\s)(EO[A-Z]{1}|END)(\s|$))
325
518
  Naming/HeredocDelimiterNaming:
326
519
  Exclude:
327
520
  - 'lib/generators/bugsnag/bugsnag_generator.rb'
328
521
 
329
522
  # Offense count: 1
330
- # Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist, MethodDefinitionMacros.
523
+ # Configuration parameters: EnforcedStyleForLeadingUnderscores.
524
+ # SupportedStylesForLeadingUnderscores: disallowed, required, optional
525
+ Naming/MemoizedInstanceVariableName:
526
+ Exclude:
527
+ - 'lib/bugsnag.rb'
528
+
529
+ # Offense count: 1
530
+ # Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros.
331
531
  # NamePrefix: is_, has_, have_
332
- # NamePrefixBlacklist: is_, has_, have_
333
- # NameWhitelist: is_a?
532
+ # ForbiddenPrefixes: is_, has_, have_
533
+ # AllowedMethods: is_a?
334
534
  # MethodDefinitionMacros: define_method, define_singleton_method
335
535
  Naming/PredicateName:
336
536
  Exclude:
337
537
  - 'spec/**/*'
338
538
  - 'lib/bugsnag/helpers.rb'
339
539
 
340
- # Offense count: 5
540
+ # Offense count: 10
541
+ # Cop supports --auto-correct.
542
+ # Configuration parameters: PreferredName.
543
+ Naming/RescuedExceptionsVariableName:
544
+ Exclude:
545
+ - 'lib/bugsnag/integrations/delayed_job.rb'
546
+ - 'lib/bugsnag/integrations/mailman.rb'
547
+ - 'lib/bugsnag/integrations/rack.rb'
548
+ - 'lib/bugsnag/integrations/rails/active_record_rescue.rb'
549
+ - 'lib/bugsnag/integrations/rake.rb'
550
+ - 'lib/bugsnag/integrations/shoryuken.rb'
551
+ - 'lib/bugsnag/integrations/sidekiq.rb'
552
+ - 'lib/bugsnag/middleware/rack_request.rb'
553
+
554
+ # Offense count: 3
555
+ # Configuration parameters: EnforcedStyle.
556
+ # SupportedStyles: snake_case, normalcase, non_integer
557
+ Naming/VariableNumber:
558
+ Exclude:
559
+ - 'spec/breadcrumbs/validator_spec.rb'
560
+
561
+ # Offense count: 20
341
562
  # Cop supports --auto-correct.
342
563
  # Configuration parameters: EnforcedStyle.
343
564
  # SupportedStyles: prefer_alias, prefer_alias_method
@@ -346,8 +567,14 @@ Style/Alias:
346
567
  - 'lib/bugsnag/configuration.rb'
347
568
  - 'lib/bugsnag/integrations/rake.rb'
348
569
  - 'lib/bugsnag/session_tracker.rb'
570
+ - 'spec/bugsnag_spec.rb'
571
+ - 'spec/integrations/mailman_spec.rb'
572
+ - 'spec/integrations/mongo_spec.rb'
573
+ - 'spec/integrations/que_spec.rb'
574
+ - 'spec/integrations/resque_spec.rb'
575
+ - 'spec/integrations/shoryuken_spec.rb'
349
576
 
350
- # Offense count: 2
577
+ # Offense count: 4
351
578
  # Cop supports --auto-correct.
352
579
  # Configuration parameters: EnforcedStyle.
353
580
  # SupportedStyles: always, conditionals
@@ -355,35 +582,30 @@ Style/AndOr:
355
582
  Exclude:
356
583
  - 'lib/bugsnag.rb'
357
584
  - 'lib/bugsnag/helpers.rb'
585
+ - 'spec/spec_helper.rb'
358
586
 
359
- # Offense count: 2
587
+ # Offense count: 6
588
+ # Cop supports --auto-correct.
589
+ # Configuration parameters: EnforcedStyle.
590
+ # SupportedStyles: percent_q, bare_percent
591
+ Style/BarePercentLiterals:
592
+ Exclude:
593
+ - 'features/steps/ruby_notifier_steps.rb'
594
+
595
+ # Offense count: 5
360
596
  # Cop supports --auto-correct.
361
- # Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods.
362
- # SupportedStyles: line_count_based, semantic, braces_for_chaining
597
+ # Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
598
+ # SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
363
599
  # ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
364
600
  # FunctionalMethods: let, let!, subject, watch
365
601
  # IgnoredMethods: lambda, proc, it
366
602
  Style/BlockDelimiters:
367
603
  Exclude:
368
604
  - 'lib/bugsnag/middleware/classify_error.rb'
605
+ - 'spec/integrations/mongo_spec.rb'
606
+ - 'spec/report_spec.rb'
369
607
 
370
- # Offense count: 12
371
- # Cop supports --auto-correct.
372
- # Configuration parameters: EnforcedStyle.
373
- # SupportedStyles: braces, no_braces, context_dependent
374
- Style/BracesAroundHashParameters:
375
- Exclude:
376
- - 'lib/bugsnag/integrations/resque.rb'
377
- - 'lib/bugsnag/integrations/shoryuken.rb'
378
- - 'lib/bugsnag/integrations/sidekiq.rb'
379
- - 'lib/bugsnag/middleware/mailman.rb'
380
- - 'lib/bugsnag/middleware/rack_request.rb'
381
- - 'lib/bugsnag/middleware/rails3_request.rb'
382
- - 'lib/bugsnag/middleware/rake.rb'
383
- - 'lib/bugsnag/middleware/suggestion_data.rb'
384
- - 'lib/bugsnag/middleware/warden_user.rb'
385
-
386
- # Offense count: 16
608
+ # Offense count: 27
387
609
  # Cop supports --auto-correct.
388
610
  # Configuration parameters: AutoCorrect, EnforcedStyle.
389
611
  # SupportedStyles: nested, compact
@@ -398,19 +620,27 @@ Style/ClassCheck:
398
620
  Exclude:
399
621
  - 'lib/bugsnag/cleaner.rb'
400
622
 
401
- # Offense count: 6
623
+ # Offense count: 9
402
624
  # Cop supports --auto-correct.
403
625
  # Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions.
404
626
  # SupportedStyles: assign_to_condition, assign_inside_condition
405
627
  Style/ConditionalAssignment:
406
628
  Exclude:
629
+ - 'features/steps/ruby_notifier_steps.rb'
407
630
  - 'lib/bugsnag.rb'
408
631
  - 'lib/bugsnag/cleaner.rb'
409
632
  - 'lib/bugsnag/delivery/synchronous.rb'
410
633
  - 'lib/bugsnag/middleware_stack.rb'
411
634
  - 'lib/bugsnag/report.rb'
635
+ - 'spec/report_spec.rb'
636
+
637
+ # Offense count: 2
638
+ # Cop supports --auto-correct.
639
+ Style/Dir:
640
+ Exclude:
641
+ - 'spec/report_spec.rb'
412
642
 
413
- # Offense count: 38
643
+ # Offense count: 22
414
644
  Style/Documentation:
415
645
  Enabled: false
416
646
 
@@ -422,15 +652,55 @@ Style/EmptyElse:
422
652
  Exclude:
423
653
  - 'lib/bugsnag/stacktrace.rb'
424
654
 
655
+ # Offense count: 15
656
+ # Cop supports --auto-correct.
657
+ Style/Encoding:
658
+ Exclude:
659
+ - 'Rakefile'
660
+ - 'spec/breadcrumbs/breadcrumb_spec.rb'
661
+ - 'spec/breadcrumbs/validator_spec.rb'
662
+ - 'spec/bugsnag_spec.rb'
663
+ - 'spec/cleaner_spec.rb'
664
+ - 'spec/configuration_spec.rb'
665
+ - 'spec/helper_spec.rb'
666
+ - 'spec/integrations/mongo_spec.rb'
667
+ - 'spec/integrations/que_spec.rb'
668
+ - 'spec/integrations/resque_spec.rb'
669
+ - 'spec/integrations/shoryuken_spec.rb'
670
+ - 'spec/middleware/exception_meta_data_spec.rb'
671
+ - 'spec/report_spec.rb'
672
+ - 'spec/session_tracker_spec.rb'
673
+ - 'spec/utility/circular_buffer_spec.rb'
674
+
675
+ # Offense count: 1
676
+ # Cop supports --auto-correct.
677
+ Style/ExpandPathArguments:
678
+ Exclude:
679
+ - 'lib/generators/bugsnag/bugsnag_generator.rb'
680
+
681
+ # Offense count: 80
682
+ # Cop supports --auto-correct.
683
+ # Configuration parameters: EnforcedStyle.
684
+ # SupportedStyles: always, always_true, never
685
+ Style/FrozenStringLiteralComment:
686
+ Enabled: false
687
+
425
688
  # Offense count: 3
689
+ # Configuration parameters: AllowedVariables.
690
+ Style/GlobalVars:
691
+ Exclude:
692
+ - 'features/steps/ruby_notifier_steps.rb'
693
+ - 'features/support/env.rb'
694
+
695
+ # Offense count: 5
426
696
  # Configuration parameters: MinBodyLength.
427
697
  Style/GuardClause:
428
698
  Exclude:
429
699
  - 'lib/bugsnag.rb'
430
- - 'lib/bugsnag/integrations/delayed_job.rb'
431
700
  - 'lib/bugsnag/integrations/resque.rb'
701
+ - 'spec/spec_helper.rb'
432
702
 
433
- # Offense count: 98
703
+ # Offense count: 547
434
704
  # Cop supports --auto-correct.
435
705
  # Configuration parameters: EnforcedStyle, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
436
706
  # SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
@@ -438,11 +708,12 @@ Style/HashSyntax:
438
708
  Enabled: false
439
709
 
440
710
  # Offense count: 1
711
+ # Configuration parameters: AllowIfModifier.
441
712
  Style/IfInsideElse:
442
713
  Exclude:
443
714
  - 'lib/bugsnag/session_tracker.rb'
444
715
 
445
- # Offense count: 15
716
+ # Offense count: 14
446
717
  # Cop supports --auto-correct.
447
718
  Style/IfUnlessModifier:
448
719
  Exclude:
@@ -452,21 +723,38 @@ Style/IfUnlessModifier:
452
723
  - 'lib/bugsnag/integrations/rack.rb'
453
724
  - 'lib/bugsnag/integrations/resque.rb'
454
725
  - 'lib/bugsnag/middleware/callbacks.rb'
455
- - 'lib/bugsnag/middleware/exception_meta_data.rb'
456
726
  - 'lib/bugsnag/middleware/rack_request.rb'
457
727
  - 'lib/bugsnag/session_tracker.rb'
458
728
  - 'lib/bugsnag/stacktrace.rb'
729
+ - 'spec/cleaner_spec.rb'
459
730
 
460
- # Offense count: 6
731
+ # Offense count: 5
732
+ # Cop supports --auto-correct.
733
+ # Configuration parameters: EnforcedStyle.
734
+ # SupportedStyles: line_count_dependent, lambda, literal
735
+ Style/Lambda:
736
+ Exclude:
737
+ - 'spec/integrations/rack_spec.rb'
738
+ - 'spec/middleware/exception_meta_data_spec.rb'
739
+
740
+ # Offense count: 8
461
741
  # Cop supports --auto-correct.
742
+ # Configuration parameters: IgnoredMethods.
462
743
  Style/MethodCallWithoutArgsParentheses:
463
744
  Exclude:
464
745
  - 'lib/bugsnag/delivery/synchronous.rb'
465
746
  - 'lib/bugsnag/report.rb'
466
747
  - 'lib/bugsnag/session_tracker.rb'
748
+ - 'spec/integrations/rake_spec.rb'
749
+ - 'spec/integrations/shoryuken_spec.rb'
750
+
751
+ # Offense count: 1
752
+ Style/MethodMissingSuper:
753
+ Exclude:
754
+ - 'lib/bugsnag/middleware_stack.rb'
467
755
 
468
756
  # Offense count: 1
469
- Style/MethodMissing:
757
+ Style/MissingRespondToMissing:
470
758
  Exclude:
471
759
  - 'lib/bugsnag/middleware_stack.rb'
472
760
 
@@ -481,19 +769,23 @@ Style/MultilineIfModifier:
481
769
  Exclude:
482
770
  - 'lib/bugsnag/integrations/rails/controller_methods.rb'
483
771
 
484
- # Offense count: 29
485
- # Cop supports --auto-correct.
486
- Style/MutableConstant:
487
- Enabled: false
488
-
489
772
  # Offense count: 4
490
773
  # Cop supports --auto-correct.
491
774
  # Configuration parameters: EnforcedStyle.
492
775
  # SupportedStyles: both, prefix, postfix
493
776
  Style/NegatedIf:
494
777
  Exclude:
495
- - 'lib/bugsnag.rb'
496
778
  - 'lib/bugsnag/session_tracker.rb'
779
+ - 'spec/middleware_spec.rb'
780
+ - 'spec/stacktrace_spec.rb'
781
+
782
+ # Offense count: 5
783
+ # Cop supports --auto-correct.
784
+ # Configuration parameters: AllowedMethods.
785
+ # AllowedMethods: be, be_a, be_an, be_between, be_falsey, be_kind_of, be_instance_of, be_truthy, be_within, eq, eql, end_with, include, match, raise_error, respond_to, start_with
786
+ Style/NestedParenthesizedCalls:
787
+ Exclude:
788
+ - 'spec/session_tracker_spec.rb'
497
789
 
498
790
  # Offense count: 2
499
791
  # Cop supports --auto-correct.
@@ -511,20 +803,23 @@ Style/NonNilCheck:
511
803
  Exclude:
512
804
  - 'lib/bugsnag/report.rb'
513
805
 
514
- # Offense count: 1
806
+ # Offense count: 13
515
807
  # Cop supports --auto-correct.
516
808
  # Configuration parameters: Strict.
517
809
  Style/NumericLiterals:
518
810
  MinDigits: 7
519
811
 
520
- # Offense count: 1
812
+ # Offense count: 6
521
813
  # Cop supports --auto-correct.
522
- # Configuration parameters: AutoCorrect, EnforcedStyle.
814
+ # Configuration parameters: AutoCorrect, EnforcedStyle, IgnoredMethods.
523
815
  # SupportedStyles: predicate, comparison
524
816
  Style/NumericPredicate:
525
817
  Exclude:
526
818
  - 'spec/**/*'
819
+ - 'Rakefile'
820
+ - 'lib/bugsnag.rb'
527
821
  - 'lib/bugsnag/session_tracker.rb'
822
+ - 'lib/bugsnag/utility/circular_buffer.rb'
528
823
 
529
824
  # Offense count: 2
530
825
  # Cop supports --auto-correct.
@@ -532,19 +827,36 @@ Style/ParallelAssignment:
532
827
  Exclude:
533
828
  - 'lib/bugsnag/stacktrace.rb'
534
829
 
830
+ # Offense count: 6
831
+ # Cop supports --auto-correct.
832
+ # Configuration parameters: PreferredDelimiters.
833
+ Style/PercentLiteralDelimiters:
834
+ Exclude:
835
+ - 'features/steps/ruby_notifier_steps.rb'
836
+
535
837
  # Offense count: 6
536
838
  # Cop supports --auto-correct.
537
839
  Style/PerlBackrefs:
538
840
  Exclude:
539
841
  - 'lib/bugsnag/stacktrace.rb'
540
842
 
541
- # Offense count: 1
843
+ # Offense count: 8
844
+ # Cop supports --auto-correct.
845
+ Style/Proc:
846
+ Exclude:
847
+ - 'spec/bugsnag_spec.rb'
848
+ - 'spec/report_spec.rb'
849
+
850
+ # Offense count: 4
542
851
  # Cop supports --auto-correct.
543
852
  # Configuration parameters: EnforcedStyle.
544
853
  # SupportedStyles: compact, exploded
545
854
  Style/RaiseArgs:
546
855
  Exclude:
547
856
  - 'lib/bugsnag/tasks/bugsnag.rake'
857
+ - 'spec/bugsnag_spec.rb'
858
+ - 'spec/integrations/rack_spec.rb'
859
+ - 'spec/integrations/rails3_request_spec.rb'
548
860
 
549
861
  # Offense count: 4
550
862
  # Cop supports --auto-correct.
@@ -553,7 +865,7 @@ Style/RedundantBegin:
553
865
  - 'lib/bugsnag/delivery/synchronous.rb'
554
866
  - 'lib/bugsnag/integrations/mailman.rb'
555
867
  - 'lib/bugsnag/integrations/shoryuken.rb'
556
- - 'lib/bugsnag/integrations/sidekiq.rb'
868
+ - 'spec/bugsnag_spec.rb'
557
869
 
558
870
  # Offense count: 1
559
871
  # Cop supports --auto-correct.
@@ -561,32 +873,41 @@ Style/RedundantException:
561
873
  Exclude:
562
874
  - 'lib/bugsnag/tasks/bugsnag.rake'
563
875
 
564
- # Offense count: 11
876
+ # Offense count: 2
877
+ # Cop supports --auto-correct.
878
+ Style/RedundantInterpolation:
879
+ Exclude:
880
+ - 'spec/helper_spec.rb'
881
+
882
+ # Offense count: 13
565
883
  # Cop supports --auto-correct.
566
884
  Style/RedundantSelf:
567
885
  Exclude:
568
886
  - 'lib/bugsnag/configuration.rb'
569
- - 'lib/bugsnag/integrations/railtie.rb'
570
887
 
571
- # Offense count: 3
888
+ # Offense count: 5
572
889
  # Cop supports --auto-correct.
573
890
  # Configuration parameters: EnforcedStyle, AllowInnerSlashes.
574
891
  # SupportedStyles: slashes, percent_r, mixed
575
892
  Style/RegexpLiteral:
576
893
  Exclude:
894
+ - 'features/steps/ruby_notifier_steps.rb'
577
895
  - 'lib/bugsnag/stacktrace.rb'
896
+ - 'spec/report_spec.rb'
897
+ - 'spec/stacktrace_spec.rb'
578
898
 
579
- # Offense count: 6
899
+ # Offense count: 11
580
900
  # Cop supports --auto-correct.
581
901
  Style/RescueModifier:
582
902
  Exclude:
583
- - 'lib/bugsnag/cleaner.rb'
584
903
  - 'lib/bugsnag/middleware/rack_request.rb'
585
904
  - 'lib/bugsnag/middleware/rails3_request.rb'
586
905
  - 'lib/bugsnag/middleware/warden_user.rb'
587
906
  - 'lib/bugsnag/stacktrace.rb'
907
+ - 'spec/integrations/rack_spec.rb'
908
+ - 'spec/stacktrace_spec.rb'
588
909
 
589
- # Offense count: 5
910
+ # Offense count: 15
590
911
  # Cop supports --auto-correct.
591
912
  # Configuration parameters: EnforcedStyle.
592
913
  # SupportedStyles: implicit, explicit
@@ -596,36 +917,65 @@ Style/RescueStandardError:
596
917
  - 'lib/bugsnag/integrations/railtie.rb'
597
918
  - 'lib/bugsnag/stacktrace.rb'
598
919
  - 'lib/bugsnag/tasks/bugsnag.rake'
920
+ - 'spec/bugsnag_spec.rb'
921
+ - 'spec/report_spec.rb'
599
922
 
600
- # Offense count: 1
923
+ # Offense count: 2
924
+ # Cop supports --auto-correct.
925
+ # Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods.
926
+ # AllowedMethods: present?, blank?, presence, try, try!
927
+ Style/SafeNavigation:
928
+ Exclude:
929
+ - 'lib/bugsnag/middleware/callbacks.rb'
930
+ - 'spec/spec_helper.rb'
931
+
932
+ # Offense count: 4
601
933
  # Cop supports --auto-correct.
602
934
  # Configuration parameters: AllowAsExpressionSeparator.
603
935
  Style/Semicolon:
604
936
  Exclude:
605
937
  - 'lib/bugsnag/configuration.rb'
938
+ - 'spec/cleaner_spec.rb'
939
+ - 'spec/configuration_spec.rb'
606
940
 
607
- # Offense count: 3
941
+ # Offense count: 2
942
+ # Cop supports --auto-correct.
943
+ # Configuration parameters: EnforcedStyle.
944
+ # SupportedStyles: only_raise, only_fail, semantic
945
+ Style/SignalException:
946
+ Exclude:
947
+ - 'spec/bugsnag_spec.rb'
948
+
949
+ # Offense count: 15
608
950
  # Cop supports --auto-correct.
609
951
  # Configuration parameters: .
610
952
  # SupportedStyles: use_perl_names, use_english_names
611
953
  Style/SpecialGlobalVars:
612
954
  EnforcedStyle: use_perl_names
613
955
 
614
- # Offense count: 176
956
+ # Offense count: 1817
615
957
  # Cop supports --auto-correct.
616
958
  # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
617
959
  # SupportedStyles: single_quotes, double_quotes
618
960
  Style/StringLiterals:
619
961
  Enabled: false
620
962
 
621
- # Offense count: 5
963
+ # Offense count: 1
964
+ # Cop supports --auto-correct.
965
+ # Configuration parameters: EnforcedStyle.
966
+ # SupportedStyles: single_quotes, double_quotes
967
+ Style/StringLiteralsInInterpolation:
968
+ Exclude:
969
+ - 'features/support/env.rb'
970
+
971
+ # Offense count: 14
622
972
  # Cop supports --auto-correct.
623
973
  # Configuration parameters: MinSize.
624
974
  # SupportedStyles: percent, brackets
625
975
  Style/SymbolArray:
626
976
  EnforcedStyle: brackets
627
977
 
628
- # Offense count: 3
978
+ # Offense count: 4
629
979
  # Cop supports --auto-correct.
630
980
  # Configuration parameters: IgnoredMethods.
631
981
  # IgnoredMethods: respond_to, define_method
@@ -634,6 +984,7 @@ Style/SymbolProc:
634
984
  - 'lib/bugsnag/middleware/classify_error.rb'
635
985
  - 'lib/bugsnag/middleware/rack_request.rb'
636
986
  - 'lib/bugsnag/middleware/suggestion_data.rb'
987
+ - 'spec/report_spec.rb'
637
988
 
638
989
  # Offense count: 1
639
990
  # Cop supports --auto-correct.
@@ -643,37 +994,56 @@ Style/TernaryParentheses:
643
994
  Exclude:
644
995
  - 'lib/bugsnag/report.rb'
645
996
 
646
- # Offense count: 5
997
+ # Offense count: 1
647
998
  # Cop supports --auto-correct.
648
999
  # Configuration parameters: EnforcedStyleForMultiline.
649
1000
  # SupportedStylesForMultiline: comma, consistent_comma, no_comma
650
- Style/TrailingCommaInLiteral:
1001
+ Style/TrailingCommaInArguments:
651
1002
  Exclude:
652
- - 'lib/bugsnag/integrations/delayed_job.rb'
1003
+ - 'spec/report_spec.rb'
653
1004
 
654
1005
  # Offense count: 2
655
1006
  # Cop supports --auto-correct.
656
- # Configuration parameters: ExactNameMatch, AllowPredicates, AllowDSLWriters, IgnoreClassMethods, Whitelist.
657
- # Whitelist: to_ary, to_a, to_c, to_enum, to_h, to_hash, to_i, to_int, to_io, to_open, to_path, to_proc, to_r, to_regexp, to_str, to_s, to_sym
1007
+ # Configuration parameters: EnforcedStyleForMultiline.
1008
+ # SupportedStylesForMultiline: comma, consistent_comma, no_comma
1009
+ Style/TrailingCommaInArrayLiteral:
1010
+ Exclude:
1011
+ - 'spec/stacktrace_spec.rb'
1012
+
1013
+ # Offense count: 4
1014
+ # Cop supports --auto-correct.
1015
+ # Configuration parameters: EnforcedStyleForMultiline.
1016
+ # SupportedStylesForMultiline: comma, consistent_comma, no_comma
1017
+ Style/TrailingCommaInHashLiteral:
1018
+ Exclude:
1019
+ - 'spec/integrations/que_spec.rb'
1020
+ - 'spec/integrations/rails3_request_spec.rb'
1021
+
1022
+ # Offense count: 2
1023
+ # Cop supports --auto-correct.
1024
+ # Configuration parameters: ExactNameMatch, AllowPredicates, AllowDSLWriters, IgnoreClassMethods, AllowedMethods.
1025
+ # AllowedMethods: to_ary, to_a, to_c, to_enum, to_h, to_hash, to_i, to_int, to_io, to_open, to_path, to_proc, to_r, to_regexp, to_str, to_s, to_sym
658
1026
  Style/TrivialAccessors:
659
1027
  Exclude:
660
1028
  - 'lib/bugsnag/configuration.rb'
661
1029
 
662
- # Offense count: 1
1030
+ # Offense count: 2
663
1031
  # Cop supports --auto-correct.
664
1032
  # Configuration parameters: MinSize, WordRegex.
665
1033
  # SupportedStyles: percent, brackets
666
1034
  Style/WordArray:
667
1035
  EnforcedStyle: brackets
668
1036
 
669
- # Offense count: 3
1037
+ # Offense count: 4
670
1038
  # Cop supports --auto-correct.
671
1039
  Style/ZeroLengthPredicate:
672
1040
  Exclude:
1041
+ - 'Rakefile'
673
1042
  - 'lib/bugsnag/session_tracker.rb'
674
1043
 
675
- # Offense count: 92
676
- # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
1044
+ # Offense count: 371
1045
+ # Cop supports --auto-correct.
1046
+ # Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
677
1047
  # URISchemes: http, https
678
- Metrics/LineLength:
679
- Max: 162
1048
+ Layout/LineLength:
1049
+ Max: 175