@@ -32,7 +32,7 @@ def self.call(command, arguments, prog_name)
32
32
parsed_options = command . default_params . merge ( parsed_options )
33
33
parse_required_params ( command , arguments , prog_name , parsed_options )
34
34
rescue ::OptionParser ::ParseError
35
- Result . failure ( "ERROR: \" #{ prog_name } \" was called with arguments \" #{ original_arguments . join ( " " ) } \" " ) # rubocop:disable Metrics /LineLength
35
+ Result . failure ( "ERROR: \" #{ prog_name } \" was called with arguments \" #{ original_arguments . join ( " " ) } \" " ) # rubocop:disable Layout /LineLength
36
36
end
37
37
38
38
# @since 0.1.0
@@ -42,14 +42,14 @@ def self.call(command, arguments, prog_name)
42
42
def self . parse_required_params ( command , arguments , prog_name , parsed_options )
43
43
parsed_params = match_arguments ( command . arguments , arguments )
44
44
parsed_required_params = match_arguments ( command . required_arguments , arguments )
45
- all_required_params_satisfied = command . required_arguments . all? { |param | !parsed_required_params [ param . name ] . nil? } # rubocop:disable Metrics /LineLength
45
+ all_required_params_satisfied = command . required_arguments . all? { |param | !parsed_required_params [ param . name ] . nil? } # rubocop:disable Layout /LineLength
46
46
47
47
unused_arguments = arguments . drop ( command . required_arguments . length )
48
48
49
49
unless all_required_params_satisfied
50
50
parsed_required_params_values = parsed_required_params . values . compact
51
51
52
- usage = "\n Usage: \" #{ prog_name } #{ command . required_arguments . map ( &:description_name ) . join ( " " ) } " # rubocop:disable Metrics /LineLength
52
+ usage = "\n Usage: \" #{ prog_name } #{ command . required_arguments . map ( &:description_name ) . join ( " " ) } " # rubocop:disable Layout /LineLength
53
53
54
54
usage += " | #{ prog_name } SUBCOMMAND" if command . subcommands . any?
55
55
@@ -58,7 +58,7 @@ def self.parse_required_params(command, arguments, prog_name, parsed_options)
58
58
if parsed_required_params_values . empty?
59
59
return Result . failure ( "ERROR: \" #{ prog_name } \" was called with no arguments#{ usage } " )
60
60
else
61
- return Result . failure ( "ERROR: \" #{ prog_name } \" was called with arguments #{ parsed_required_params_values } #{ usage } " ) # rubocop:disable Metrics /LineLength
61
+ return Result . failure ( "ERROR: \" #{ prog_name } \" was called with arguments #{ parsed_required_params_values } #{ usage } " ) # rubocop:disable Layout /LineLength
62
62
end
63
63
end
64
64
0 commit comments