File tree Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Original file line number Diff line number Diff line change
1
+ package = " luacov-console"
2
+ version = " 1.1.0-1"
3
+ source = {
4
+ url = " git://github.com/spacewander/luacov-console" ,
5
+ tag = " 1.1" ,
6
+ }
7
+ description = {
8
+ summary = " Combine luacov with your development cycle and CI" ,
9
+ detailed = " Combine luacov with your development cycle and CI" ,
10
+ homepage = " https://github.com/spacewander/luacov-console" ,
11
+ license = " MIT"
12
+ }
13
+ dependencies = {
14
+ " lua >= 5.1" ,
15
+ " luacov > 0.5" ,
16
+ " luafilesystem" ,
17
+ " argparse" ,
18
+ }
19
+ build = {
20
+ type = " builtin" ,
21
+ -- I hope it's simple enough to use without any docs
22
+ copy_directories = {},
23
+ modules = {
24
+ [' luacov.reporter.console' ] = " src/luacov/reporter/console.lua" ,
25
+ },
26
+ install = {
27
+ bin = {
28
+ [" luacov-console" ] = " src/luacov-console.lua" ,
29
+ }
30
+ },
31
+ }
Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ local reporter = require("luacov.reporter.console")
6
6
local argparse = require (" argparse" )
7
7
local lfs = require (' lfs' )
8
8
9
+ local VERSION = " 1.1.0"
10
+
9
11
-- Use ANSI escape sequences.
10
12
-- https://en.wikipedia.org/wiki/ANSI_escape_code
11
13
-- The Win32 console did not support ANSI escape sequences at all until Windows 10.
164
166
local parser = argparse (" luacov-console" ,
165
167
" Combine luacov with your development cycle and CI" )
166
168
parser :argument (" workdir" , " Specific the source directory" , ' .' )
169
+ parser :option (" --version" , " Print version" ):args (0 )
167
170
parser :option (" --no-colored" , " Don't print with color." ):args (0 )
168
171
parser :option (" -l --list" , " List coverage results of files matched given lua pattern(s)." ):args (' +' )
169
172
parser :option (" -s --summary" , " Show coverage summary." ):args (0 )
@@ -174,6 +177,8 @@ if args.list then
174
177
print_results (args .list , args .no_colored )
175
178
elseif args .summary then
176
179
print_summary (args .no_colored )
180
+ elseif args .version then
181
+ print (VERSION )
177
182
else
178
183
reporter .report (args )
179
184
end
You can’t perform that action at this time.
0 commit comments