Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore/update rubocop to 0.58.1 #1309

Merged
merged 3 commits into from Jul 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
128 changes: 96 additions & 32 deletions .rubocop_todo.yml
@@ -1,36 +1,52 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2018-01-04 21:02:19 +0100 using RuboCop version 0.52.1.
# on 2018-07-19 13:40:39 +0200 using RuboCop version 0.58.1.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 12
# Offense count: 13
# Cop supports --auto-correct.
# Configuration parameters: Include, TreatCommentsAsGroupSeparators.
# Include: **/Gemfile, **/gems.rb
# Include: **/*.gemfile, **/Gemfile, **/gems.rb
Bundler/OrderedGems:
Exclude:
- 'Gemfile'

# Offense count: 14
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, IndentationWidth.
# SupportedStyles: outdent, indent
Layout/AccessModifierIndentation:
Exclude:
- 'app/controllers/api/v1/stats_controller.rb'
- 'app/controllers/apps_controller.rb'
- 'app/controllers/comments_controller.rb'
- 'app/controllers/problems_controller.rb'
- 'app/controllers/site_config_controller.rb'
- 'app/controllers/users/omniauth_callbacks_controller.rb'
- 'app/decorators/issue_tracker_field_decorator.rb'
- 'app/helpers/apps_helper.rb'
- 'app/mailers/mailer.rb'
- 'app/models/backtrace.rb'
- 'app/models/notification_services/hipchat_service.rb'
- 'app/models/user.rb'
- 'lib/hoptoad.rb'

# Offense count: 1
# Cop supports --auto-correct.
Layout/ClosingParenthesisIndentation:
Exclude:
- 'app/models/user.rb'

# Offense count: 2
# Cop supports --auto-correct.
Layout/EmptyLineAfterMagicComment:
Exclude:
- 'app/helpers/notices_helper.rb'
- 'app/helpers/sort_helper.rb'

# Offense count: 12
# Cop supports --auto-correct.
Layout/EmptyLinesAroundArguments:
Exclude:
- 'app/controllers/api/v1/stats_controller.rb'
- 'app/controllers/problems_controller.rb'
- 'app/helpers/apps_helper.rb'
- 'config/load.rb'
- 'lib/overrides/hoptoad_notifier/hoptoad_notifier.rb'

# Offense count: 3
# Cop supports --auto-correct.
# Configuration parameters: IndentationWidth.
Expand Down Expand Up @@ -148,19 +164,20 @@ Lint/UselessAccessModifier:
Exclude:
- 'lib/hoptoad/v2.rb'

# Offense count: 36
# Offense count: 35
Metrics/AbcSize:
Max: 52

# Offense count: 117
# Offense count: 118
# Configuration parameters: CountComments, ExcludedMethods.
# ExcludedMethods: refine
Metrics/BlockLength:
Max: 418

# Offense count: 5
# Offense count: 4
# Configuration parameters: CountComments.
Metrics/ClassLength:
Max: 195
Max: 168

# Offense count: 6
Metrics/CyclomaticComplexity:
Expand All @@ -169,12 +186,29 @@ Metrics/CyclomaticComplexity:
# Offense count: 33
# Configuration parameters: CountComments.
Metrics/MethodLength:
Max: 36
Max: 33

# Offense count: 5
Metrics/PerceivedComplexity:
Max: 12

# Offense count: 3
# Configuration parameters: EnforcedStyleForLeadingUnderscores.
# SupportedStylesForLeadingUnderscores: disallowed, required, optional
Naming/MemoizedInstanceVariableName:
Exclude:
- 'app/interactors/outdated_problem_clearer.rb'
- 'app/interactors/resolved_problem_clearer.rb'
- 'app/models/error_report.rb'

# Offense count: 2
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
# AllowedNames: io, id, to, by, on, in, at
Naming/UncommunicativeMethodParamName:
Exclude:
- 'app/models/notice.rb'
- 'app/models/notification_service.rb'

# Offense count: 6
# Configuration parameters: EnforcedStyle.
# SupportedStyles: snake_case, normalcase, non_integer
Expand Down Expand Up @@ -211,6 +245,26 @@ Security/JSONLoad:
- 'spec/controllers/api/v1/notices_controller_spec.rb'
- 'spec/controllers/api/v1/problems_controller_spec.rb'

# Offense count: 15
# Configuration parameters: EnforcedStyle.
# SupportedStyles: inline, group
Style/AccessModifierDeclarations:
Exclude:
- 'app/controllers/api/v1/stats_controller.rb'
- 'app/controllers/apps_controller.rb'
- 'app/controllers/comments_controller.rb'
- 'app/controllers/problems_controller.rb'
- 'app/controllers/site_config_controller.rb'
- 'app/controllers/users/omniauth_callbacks_controller.rb'
- 'app/decorators/issue_tracker_field_decorator.rb'
- 'app/helpers/apps_helper.rb'
- 'app/mailers/mailer.rb'
- 'app/models/backtrace.rb'
- 'app/models/notification_services/hipchat_service.rb'
- 'app/models/user.rb'
- 'lib/hoptoad.rb'
- 'lib/overrides/hoptoad_notifier/hoptoad_notifier.rb'

# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
Expand Down Expand Up @@ -252,7 +306,7 @@ Style/ConditionalAssignment:
- 'app/models/notification_service.rb'
- 'lib/recurse.rb'

# Offense count: 73
# Offense count: 72
Style/Documentation:
Enabled: false

Expand Down Expand Up @@ -282,27 +336,29 @@ Style/Encoding:
- 'app/helpers/notices_helper.rb'
- 'app/helpers/sort_helper.rb'

# Offense count: 1
# Configuration parameters: EnforcedStyle.
# SupportedStyles: for, each
Style/For:
# Offense count: 7
# Cop supports --auto-correct.
Style/ExpandPathArguments:
Exclude:
- 'app/views/problems/_list.atom.builder'
- 'Rakefile'
- 'bin/rails'
- 'config/application.rb'
- 'config/boot.rb'
- 'config/environment.rb'
- 'spec/spec_helper.rb'

# Offense count: 15
# Offense count: 11
# Configuration parameters: EnforcedStyle.
# SupportedStyles: annotated, template, unannotated
Style/FormatStringToken:
Exclude:
- 'app/decorators/backtrace_line_decorator.rb'
- 'app/helpers/problems_helper.rb'
- 'app/interactors/notice_refingerprinter.rb'
- 'app/interactors/problem_recacher.rb'
- 'spec/views/apps/edit.html.haml_spec.rb'
- 'spec/views/problems/show.html.haml_spec.rb'
- 'spec/views/users/show.html.haml_spec.rb'

# Offense count: 219
# Offense count: 218
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: when_needed, always, never
Expand Down Expand Up @@ -418,11 +474,13 @@ Style/RescueStandardError:
- 'app/models/error_report.rb'
- 'app/models/issue.rb'

# Offense count: 7
# Offense count: 8
# Cop supports --auto-correct.
# Configuration parameters: ConvertCodeThatCanStartToReturnNil.
# Configuration parameters: ConvertCodeThatCanStartToReturnNil, Whitelist.
# Whitelist: present?, blank?, presence, try, try!
Style/SafeNavigation:
Exclude:
- 'app/decorators/backtrace_line_decorator.rb'
- 'app/models/app.rb'
- 'app/models/comment.rb'
- 'app/models/issue.rb'
Expand All @@ -443,7 +501,7 @@ Style/SignalException:
- 'lib/airbrake_api/v3/notice_parser.rb'
- 'lib/hoptoad.rb'

# Offense count: 922
# Offense count: 938
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
# SupportedStyles: single_quotes, double_quotes
Expand All @@ -466,6 +524,12 @@ Style/TernaryParentheses:
- 'app/helpers/sort_helper.rb'
- 'app/models/notification_services/hipchat_service.rb'

# Offense count: 1
# Cop supports --auto-correct.
Style/UnneededCondition:
Exclude:
- 'app/models/issue_tracker.rb'

# Offense count: 1
# Cop supports --auto-correct.
Style/UnneededInterpolation:
Expand All @@ -478,7 +542,7 @@ Style/ZeroLengthPredicate:
Exclude:
- 'app/interactors/notice_refingerprinter.rb'

# Offense count: 453
# Offense count: 452
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
# URISchemes: http, https
Metrics/LineLength:
Expand Down
19 changes: 11 additions & 8 deletions Gemfile.lock
Expand Up @@ -44,7 +44,7 @@ GEM
builder
multi_json
arel (6.0.4)
ast (2.3.0)
ast (2.4.0)
bcrypt (3.1.11)
bcrypt (3.1.11-java)
better_errors (2.1.1)
Expand Down Expand Up @@ -159,6 +159,8 @@ GEM
multi_xml (>= 0.5.2)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
jaro_winkler (1.5.1)
jaro_winkler (1.5.1-java)
jquery-rails (4.3.3)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
Expand Down Expand Up @@ -241,8 +243,8 @@ GEM
origin (2.3.1)
orm_adapter (0.5.0)
parallel (1.12.1)
parser (2.4.0.2)
ast (~> 2.3)
parser (2.5.1.2)
ast (~> 2.4.0)
phantomjs (2.1.1.0)
pjax_rails (0.4.0)
jquery-rails
Expand All @@ -252,7 +254,7 @@ GEM
cliver (~> 0.3.1)
multi_json (~> 1.0)
websocket-driver (>= 0.2.0)
powerpack (0.1.1)
powerpack (0.1.2)
premailer (1.8.4)
css_parser (>= 1.3.6)
htmlentities (>= 4.0.0)
Expand Down Expand Up @@ -356,9 +358,10 @@ GEM
rspec-mocks (~> 3.5.0)
rspec-support (~> 3.5.0)
rspec-support (3.5.0)
rubocop (0.52.1)
rubocop (0.58.1)
jaro_winkler (~> 1.5.1)
parallel (~> 1.10)
parser (>= 2.4.0.2, < 3.0)
parser (>= 2.5, != 2.5.1.1)
powerpack (~> 0.1)
rainbow (>= 2.2.2, < 4.0)
ruby-progressbar (~> 1.7)
Expand Down Expand Up @@ -422,7 +425,7 @@ GEM
unf_ext
unf (0.1.4-java)
unf_ext (0.0.7.1)
unicode-display_width (1.3.0)
unicode-display_width (1.4.0)
useragent (0.14.0)
warden (1.2.7)
rack (>= 1.0)
Expand Down Expand Up @@ -512,4 +515,4 @@ DEPENDENCIES
yajl-ruby

BUNDLED WITH
1.16.1
1.16.2
2 changes: 1 addition & 1 deletion app/views/problems/_list.atom.builder
@@ -1,6 +1,6 @@
feed.updated(problems.first.try(:created_at) || Time.now)

for problem in problems
problems.each do |problem|
notice = problem.notices.first

feed.entry(problem, :url => app_problem_url(problem.app.to_param, problem.to_param)) do |entry|
Expand Down