We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5d3c18f commit 374b0e1Copy full SHA for 374b0e1
lua_cliargs-3.0.rc-1.rockspec lua_cliargs-3.0.rockspeclua_cliargs-3.0.rc-1.rockspec renamed to lua_cliargs-3.0.rockspec
@@ -1,5 +1,5 @@
1
package = "lua_cliargs"
2
-version = "3.0.rc-1"
+version = "3.0"
3
source = {
4
url = "git://github.com/amireh/lua_cliargs.git",
5
branch = "3.0"
spec/cliargs_parsing_spec.lua
@@ -39,7 +39,7 @@ describe("Testing cliargs library parsing commandlines", function()
39
it("tests required argument callback returning error", function()
40
cli:argument("ARG", "arg description", callback_fail)
41
42
- local args, err = cli:parse({ "arg_val" })
+ local _, err = cli:parse({ "arg_val" })
43
assert.matches('bad argument for ARG', err)
44
end)
45
@@ -68,7 +68,7 @@ describe("Testing cliargs library parsing commandlines", function()
68
cli:set_name('myapp')
69
cli:splat("OPTARG", "optinoal arg description", nil, 1, callback_fail)
70
71
- local args, err = cli:parse({ "opt_arg" })
+ local _, err = cli:parse({ "opt_arg" })
72
assert.matches('bad argument for OPTARG', err)
73
74
spec/features/argument_spec.lua
@@ -45,7 +45,7 @@ describe("cliargs - arguments", function()
it('works with a single argument', function()
46
cli:argument('PATH', 'path to a file')
47
48
- local args, err = helpers.parse(cli, '/some/where')
+ local args = helpers.parse(cli, '/some/where')
49
50
assert.equal(args.PATH, '/some/where')
51
@@ -64,14 +64,14 @@ describe("cliargs - arguments", function()
64
cli:argument('INPUT', 'path to the input file')
65
cli:argument('OUTPUT', 'path to the output file')
66
67
+ local _, err = helpers.parse(cli, '/some/where')
assert.matches('bad number of arguments', err)
it('bails on too many arguments', function()
- local args, err = helpers.parse(cli, 'foo bar')
+ local _, err = helpers.parse(cli, 'foo bar')
75
76
77
spec/features/flag_spec.lua
@@ -86,7 +86,7 @@ describe("cliargs - flags", function()
86
87
context('given an unknown flag', function()
88
it('bails', function()
89
- local res, err = helpers.parse(cli, '--asdf', true)
+ local _, err = helpers.parse(cli, '--asdf', true)
90
assert.matches('unknown', err)
91
92
@@ -131,7 +131,7 @@ describe("cliargs - flags", function()
131
132
133
134
- local res, err = helpers.parse(cli, '--no-quiet')
+ local _, err = helpers.parse(cli, '--no-quiet')
135
assert.matches('may not be negated', err)
136
137
spec/features/option_spec.lua
@@ -134,13 +134,13 @@ describe("cliargs - options", function()
context('given an unknown option', function()
- local args, err = helpers.parse(cli, '--asdf=jkl;', true)
+ local _, err = helpers.parse(cli, '--asdf=jkl;', true)
138
139
140
141
142
it('bails if no value was passed', function()
143
- local args, err = helpers.parse(cli, '-s')
+ local _, err = helpers.parse(cli, '-s')
144
assert.matches("option %-s requires a value to be set", err)
145
146
@@ -219,7 +219,7 @@ describe("cliargs - options", function()
219
return nil, ">>> bad argument <<<"
220
221
222
- local args, err = helpers.parse(cli, '-c lzma', true)
+ local _, err = helpers.parse(cli, '-c lzma', true)
223
assert.equal('>>> bad argument <<<', err)
224
225
spec/features/splatarg_spec.lua
@@ -84,7 +84,7 @@ describe("cliargs - splat arguments", function()
84
it('bails if more values were passed than acceptable', function()
85
cli:splat('SPLAT', 'foobar', nil, 2)
- local args, err = helpers.parse(cli, 'a b c')
+ local _, err = helpers.parse(cli, 'a b c')
assert.matches("bad number of arguments", err)
src/cliargs.lua
@@ -27,6 +27,6 @@ function cli:cleanup()
27
cli = nil
28
end
29
30
-cli.VERSION = "3.0.rc-1"
+cli.VERSION = "3.0"
31
32
return cli
src/cliargs/parser.lua
@@ -256,8 +256,6 @@ function p.collect_results(cli_values, options)
256
else
257
return entry_values
258
259
-
260
- return entry_values
261
262
263
local function write(entry, value)
0 commit comments