File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -12,11 +12,15 @@ module Skunk
12
12
module Cli
13
13
# Knows how to execute command line commands
14
14
class Application < RubyCritic ::Cli ::Application
15
+ COVERAGE_FILE = "coverage/.resultset.json"
16
+
15
17
def initialize ( argv )
16
18
@options = Skunk ::Cli ::Options . new ( argv )
17
19
end
18
20
19
21
def execute
22
+ warn_coverage_info unless File . exist? ( COVERAGE_FILE )
23
+
20
24
parsed_options = @options . parse . to_h
21
25
reporter = Skunk ::Cli ::CommandFactory . create ( parsed_options ) . execute
22
26
print ( reporter . status_message )
@@ -25,6 +29,13 @@ def execute
25
29
warn "Error: #{ error } "
26
30
STATUS_ERROR
27
31
end
32
+
33
+ private
34
+
35
+ def warn_coverage_info
36
+ warn "warning: Couldn't find coverage info at #{ COVERAGE_FILE } ."
37
+ warn "warning: Having no coverage metrics will make your SkunkScore worse."
38
+ end
28
39
end
29
40
end
30
41
end
You can’t perform that action at this time.
0 commit comments