Skip to content

Commit

Permalink
Merge pull request #284 from bastelfreak/rubocop2
Browse files Browse the repository at this point in the history
rubocop: Fix Performance/StringInclude & RSpec/BeEq
  • Loading branch information
ekohl authored May 17, 2024
2 parents 8d315d2 + 5a9c90d commit 2617d3c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 19 deletions.
14 changes: 1 addition & 13 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2024-05-17 10:11:09 UTC using RuboCop version 1.63.5.
# on 2024-05-17 11:57:48 UTC using RuboCop version 1.63.5.
# 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
Expand All @@ -12,18 +12,6 @@ Lint/SuppressedException:
Exclude:
- 'Rakefile'

# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
Performance/StringInclude:
Exclude:
- 'Rakefile'

# Offense count: 5
# This cop supports unsafe autocorrection (--autocorrect-all).
RSpec/BeEq:
Exclude:
- 'spec/unit/module_sync/settings_spec.rb'

# Offense count: 3
# Configuration parameters: Prefixes, AllowedPatterns.
# Prefixes: when, with, without
Expand Down
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ begin

# Workaround for https://github.com/github-changelog-generator/github-changelog-generator/issues/715
require 'rbconfig'
if /linux/.match?(RbConfig::CONFIG['host_os'])
if RbConfig::CONFIG['host_os'].include?('linux')
task :changelog do
puts 'Fixing line endings...'
changelog_file = File.join(__dir__, 'CHANGELOG.md')
Expand Down
10 changes: 5 additions & 5 deletions spec/unit/module_sync/settings_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
)
end

it { is_expected.not_to eq nil }
it { expect(subject.managed?('Rakefile')).to eq false }
it { expect(subject.managed?('Rakefile/foo')).to eq false }
it { expect(subject.managed?('Gemfile')).to eq true }
it { expect(subject.managed?('Gemfile/foo')).to eq true }
it { is_expected.not_to be_nil }
it { expect(subject.managed?('Rakefile')).to be false }
it { expect(subject.managed?('Rakefile/foo')).to be false }
it { expect(subject.managed?('Gemfile')).to be true }
it { expect(subject.managed?('Gemfile/foo')).to be true }
it { expect(subject.managed_files([])).to eq ['Gemfile'] }
it { expect(subject.managed_files(%w[Rakefile Gemfile other_file])).to eq %w[Gemfile other_file] }
it { expect(subject.unmanaged_files([])).to eq ['Rakefile'] }
Expand Down

0 comments on commit 2617d3c

Please sign in to comment.