Skip to content

Commit

Permalink
Merge pull request #1487 from ydah/update-rubocop
Browse files Browse the repository at this point in the history
Bump rubocop version and fix new offenses
  • Loading branch information
manicmaniac committed Apr 18, 2024
2 parents f090834 + 232c73b commit f7786f4
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Expand Up @@ -17,7 +17,7 @@ gem "pry-byebug"
gem "rake", "~> 13.0"
gem "rspec", "~> 3.9"
gem "rspec_junit_formatter", "~> 0.4"
gem "rubocop", "~> 1.53.0"
gem "rubocop", "~> 1.63.1"
gem "simplecov", "~> 0.18"
gem "test-queue"
gem "webmock", "~> 3.16.2"
Expand Down
2 changes: 1 addition & 1 deletion lib/danger/danger_core/environment_manager.rb
Expand Up @@ -108,7 +108,7 @@ def extract_title_and_subtitle_from_source(repo_url)
title = "For Danger to run on this project, you need to expose a set of following the ENV vars:\n#{RequestSources::RequestSource.available_source_names_and_envs.join("\n")}"
end

[title, (subtitle || "")]
[title, subtitle || ""]
end

def ui_display_no_request_source_error_message(ui, env, title, subtitle)
Expand Down
2 changes: 1 addition & 1 deletion lib/danger/request_sources/bitbucket_cloud.rb
Expand Up @@ -82,7 +82,7 @@ def update_pull_request!(warnings: [], errors: [], messages: [], markdowns: [],
messages = update_inline_comments_for_kind!(:messages, messages, danger_id: danger_id)
markdowns = update_inline_comments_for_kind!(:markdowns, markdowns, danger_id: danger_id)

has_comments = (warnings.count.positive? || errors.count.positive? || messages.count.positive? || markdowns.count.positive?)
has_comments = warnings.count.positive? || errors.count.positive? || messages.count.positive? || markdowns.count.positive?
if has_comments
comment = generate_description(warnings: warnings, errors: errors, template: "bitbucket_server")
comment += "\n\n"
Expand Down
2 changes: 1 addition & 1 deletion lib/danger/request_sources/bitbucket_server.rb
Expand Up @@ -115,7 +115,7 @@ def update_pull_request!(warnings: [], errors: [], messages: [], markdowns: [],
markdowns = main_violations[:markdowns] || []
end

has_comments = (warnings.count > 0 || errors.count > 0 || messages.count > 0 || markdowns.count > 0)
has_comments = warnings.count > 0 || errors.count > 0 || messages.count > 0 || markdowns.count > 0
if has_comments
comment = generate_description(warnings: warnings,
errors: errors)
Expand Down
2 changes: 1 addition & 1 deletion lib/danger/request_sources/gitlab.rb
Expand Up @@ -304,7 +304,7 @@ def dismiss_out_of_range_messages_for(kind)

# @return [String] A URL to the specific file, ready to be downloaded
def file_url(organisation: nil, repository: nil, ref: nil, branch: nil, path: nil)
ref ||= (branch || "master")
ref ||= branch || "master"
# According to GitLab Repositories API docs path and id(slug) should be encoded.
path = URI.encode_www_form_component(path)
repository = URI.encode_www_form_component(repository)
Expand Down

0 comments on commit f7786f4

Please sign in to comment.