Skip to content

Commit

Permalink
Merge pull request #1175 from openSUSE/hellcp/rubocop-version
Browse files Browse the repository at this point in the history
Use the correct ruby version in rubocop
  • Loading branch information
hennevogel committed Mar 30, 2022
2 parents 0f600ba + 96cdf4f commit 11d6497
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ inherit_from: .rubocop_todo.yml
require: rubocop-performance

AllCops:
TargetRubyVersion: 2.5
TargetRubyVersion: 3.1
NewCops: enable
Exclude:
- 'bin/*'
Expand All @@ -15,3 +15,6 @@ AllCops:
- 'script/**/*'
- 'vendor/**/*'
- 'public/**/*'

Style/HashSyntax:
EnforcedShorthandSyntax: either
2 changes: 1 addition & 1 deletion app/controllers/package_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def show
@official_projects = @distributions.map { |d| d[:project] }
# get extra distributions that are not in the default distribution list
@extra_packages = @packages.reject { |p| @distributions.map { |d| d[:project] }.include? p.baseproject }
@extra_dists = @extra_packages.map(&:baseproject).compact.uniq.map { |d| { project: d } }
@extra_dists = @extra_packages.filter_map(&:baseproject).uniq.map { |d| { project: d } }
rescue OBSError
@hide_search_box = true
flash.now[:error] = _('Connection to OBS is unavailable. Functionality of this site is limited.')
Expand Down

0 comments on commit 11d6497

Please sign in to comment.