Skip to content

Commit d6116b6

Browse files
committed
Merge branch 'kpaulisse-option-coverage' into kpaulisse-release-branch
2 parents 2446680 + 524ea0c commit d6116b6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/octocatalog-diff/cli/options.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ def self.classes
2323

2424
# Define the Option class and newoption() method for use by cli/options/*.rb files
2525
class Option
26-
DEFAULT_WEIGHT = 999
2726
def self.has_weight(w) # rubocop:disable Style/PredicateName
2827
@weight = w
2928
end
@@ -38,7 +37,9 @@ def self.weight
3837
elsif @weight
3938
@weight
4039
else
41-
DEFAULT_WEIGHT
40+
# :nocov:
41+
raise ArgumentError, "Option #{name} does not have a weight specified. Add 'has_weight NNN' to control ordering."
42+
# :nocov:
4243
end
4344
end
4445

0 commit comments

Comments
 (0)