Skip to content

Commit 6a9e2d5

Browse files
committed
Lint/UnreachableCode
This lint is helpful to show that "just in case" isn't needed.
1 parent 35c9550 commit 6a9e2d5

File tree

2 files changed

+0
-11
lines changed

2 files changed

+0
-11
lines changed

.rubocop_todo.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -696,10 +696,6 @@ Lint/UnderscorePrefixedVariableName:
696696
- 'lib/puppet/type/file/checksum_value.rb'
697697
- 'lib/puppet/type/file/content.rb'
698698

699-
Lint/UnreachableCode:
700-
Exclude:
701-
- 'lib/puppet/provider/package/portupgrade.rb'
702-
703699
# Configuration parameters: AllowedPatterns, IgnoredPatterns.
704700
# AllowedPatterns: (?-mix:(exactly|at_least|at_most)\(\d+\)\.times)
705701
Lint/UnreachableLoop:

lib/puppet/provider/package/portupgrade.rb

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -155,14 +155,7 @@ def latest
155155
# Any other error (dump output to log)
156156
raise Puppet::ExecutionFailure, _("Unexpected output from portversion: %{output}") % { output: output }
157157
end
158-
159-
# Just in case we still are running, return nil
160-
return nil
161158
end
162-
163-
# At this point normal operation has finished and we shouldn't have been called.
164-
# Error out and let the admin deal with it.
165-
raise Puppet::Error, _("portversion.latest() - fatal error with portversion: %{output}") % { output: output }
166159
end
167160

168161
###### Query subcommand - return a hash of details if exists, or nil if it doesn't.

0 commit comments

Comments
 (0)