Skip to content

Commit

Permalink
rubocop: autofix
Browse files Browse the repository at this point in the history
  • Loading branch information
bastelfreak committed Aug 17, 2023
1 parent 30e66d6 commit ad9fa8c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 18 deletions.
17 changes: 6 additions & 11 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 2022-05-05 20:18:17 UTC using RuboCop version 1.22.3.
# on 2023-08-17 21:29:27 UTC using RuboCop version 1.50.2.
# 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 @@ -13,15 +13,14 @@ Lint/ConstantDefinitionInBlock:
Exclude:
- 'spec/unit/puppet/provider/augeasprovider/default_spec.rb'

# Offense count: 6
# Offense count: 5
# Configuration parameters: AllowComments, AllowEmptyLambdas.
Lint/EmptyBlock:
Exclude:
- 'spec/unit/puppet/provider/augeasprovider/default_spec.rb'

# Offense count: 1
# Configuration parameters: IgnoreImplicitReferences.
Lint/ShadowedArgument:
Lint/UselessRescue:
Exclude:
- 'lib/puppet/provider/augeasprovider/default.rb'

Expand All @@ -35,24 +34,20 @@ RSpec/LeakyConstantDeclaration:
Exclude:
- 'spec/unit/puppet/provider/augeasprovider/default_spec.rb'

# Offense count: 100
# Offense count: 96
# Configuration parameters: .
# SupportedStyles: have_received, receive
RSpec/MessageSpies:
EnforcedStyle: receive

# Offense count: 4
RSpec/RepeatedExampleGroupDescription:
Exclude:
- 'spec/unit/puppet/provider/augeasprovider/default_spec.rb'

# Offense count: 46
RSpec/StubbedMock:
Exclude:
- 'spec/unit/puppet/provider/augeasprovider/default_spec.rb'

# Offense count: 1
# Configuration parameters: MinBodyLength.
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: MinBodyLength, AllowConsecutiveConditionals.
Style/GuardClause:
Exclude:
- 'lib/puppet/provider/augeasprovider/default.rb'
Expand Down
12 changes: 5 additions & 7 deletions spec/lib/augeas_spec/augparse.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,11 @@ def augparse(file, lens, result = '?')

# Test module, Augeas reads back in the input file
testaug = "#{dir}/test_augeasproviders.aug"
File.open(testaug, 'w') do |tf|
tf.write(<<~EOS)
module Test_Augeasproviders =
test #{lens} get Sys.read_file "#{dir}/input" =
#{result}
EOS
end
File.write(testaug, <<~EOS)
module Test_Augeasproviders =
test #{lens} get Sys.read_file "#{dir}/input" =
#{result}
EOS

output = `augparse --notypecheck #{testaug} 2>&1`
raise AugeasSpec::Error, "augparse failed:\n#{output}" unless $CHILD_STATUS == 0 && output.empty?
Expand Down

0 comments on commit ad9fa8c

Please sign in to comment.