File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -135,7 +135,11 @@ module Stats = struct
135
135
^ (sortedIssues
136
136
|> List. map (fun (name , cnt ) -> name ^ " :" ^ string_of_int ! cnt)
137
137
|> String. concat " , " )
138
- ^ " )" ))
138
+ ^ " )" ));
139
+
140
+ nIssues
141
+ else
142
+ 0
139
143
end
140
144
141
145
type kind = Warning | Error
Original file line number Diff line number Diff line change @@ -95,9 +95,10 @@ let runAnalysis ~cmtRoot ~ppf =
95
95
if runConfig.exception_ then Exception. reportResults ~ppf ;
96
96
if runConfig.noalloc then Noalloc. reportResults ~ppf ;
97
97
if runConfig.termination then Arnold. reportResults ~ppf ;
98
- Log_.Stats. report () ;
98
+ let nIssues = Log_.Stats. report () in
99
99
Log_.Stats. clear () ;
100
- if ! Common.Cli. json then EmitJson. finish ()
100
+ if ! Common.Cli. json then EmitJson. finish () ;
101
+ if nIssues > 0 then exit 1
101
102
102
103
let cli () =
103
104
let analysisKindSet = ref false in
You can’t perform that action at this time.
0 commit comments