Skip to content

Commit

Permalink
(maint) Enable new cops
Browse files Browse the repository at this point in the history
* Opt into new cops via `NewCops`
* Ignore the duplicate `platform.is_windows?` branch as all `build_requires` are
  defined first, followed by defining commands.
* Add parenthesis to fix Lint/AmbiguousOperatorPrecedence
  • Loading branch information
joshcooper committed Oct 29, 2021
1 parent f9aa649 commit 5b4c96b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
AllCops:
NewCops: enable
Include:
- 'bin/**/*.rb'
- 'configs/**/*.rb'
Expand Down
2 changes: 1 addition & 1 deletion configs/components/facter-precompiled-gem.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

if platform.is_osx?
pkg.build_requires "cmake"
elsif platform.is_windows?
elsif platform.is_windows? #rubocop:disable Lint/DuplicateBranch
pkg.build_requires "cmake"
elsif platform.name =~ /sles-15/
# These platforms use their default OS toolchain and have package
Expand Down
2 changes: 1 addition & 1 deletion configs/components/leatherman.rb
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
# Make test will explode horribly in a cross-compile situation
# Tests will be skipped on AIX until they are expected to pass
if !platform.is_cross_compiled? && !platform.is_aix?
if platform.is_solaris? && platform.architecture != 'sparc' || platform.name =~ /debian-10/
if (platform.is_solaris? && platform.architecture != 'sparc') || platform.name =~ /debian-10/
test_locale = "LANG=C LC_ALL=C"
end

Expand Down

0 comments on commit 5b4c96b

Please sign in to comment.