@@ -40,7 +40,7 @@ fn main() {
4040 let files = & arguments. files ;
4141 if let Err ( error) = validate_files_paths ( files) {
4242 reporter. report_diagnostic ( "" , Diagnostic :: error ( error. as_str ( ) ) ) ;
43- return ;
43+ std :: process :: exit ( 1 ) ;
4444 }
4545
4646 let mut env = create_clang_ql_environment ( ) ;
@@ -57,7 +57,7 @@ fn main() {
5757 let files = & arguments. files ;
5858 if let Err ( error) = validate_files_paths ( files) {
5959 reporter. report_diagnostic ( "" , Diagnostic :: error ( error. as_str ( ) ) ) ;
60- return ;
60+ std :: process :: exit ( 1 ) ;
6161 }
6262
6363 let mut env = create_clang_ql_environment ( ) ;
@@ -83,7 +83,7 @@ fn launch_clangql_repl(arguments: Arguments) {
8383 let files = & arguments. files ;
8484 if let Err ( error) = validate_files_paths ( files) {
8585 reporter. report_diagnostic ( "" , Diagnostic :: error ( error. as_str ( ) ) ) ;
86- return ;
86+ std :: process :: exit ( 1 ) ;
8787 }
8888
8989 let mut global_env = create_clang_ql_environment ( ) ;
@@ -147,7 +147,7 @@ fn execute_clang_ql_query(
147147 if tokenizer_result. is_err ( ) {
148148 let diagnostic = tokenizer_result. err ( ) . unwrap ( ) ;
149149 reporter. report_diagnostic ( & query, * diagnostic) ;
150- return ;
150+ std :: process :: exit ( 1 ) ;
151151 }
152152
153153 let tokens = tokenizer_result. ok ( ) . unwrap ( ) ;
@@ -159,7 +159,7 @@ fn execute_clang_ql_query(
159159 if parser_result. is_err ( ) {
160160 let diagnostic = parser_result. err ( ) . unwrap ( ) ;
161161 reporter. report_diagnostic ( & query, * diagnostic) ;
162- return ;
162+ std :: process :: exit ( 1 ) ;
163163 }
164164
165165 let query_node = parser_result. ok ( ) . unwrap ( ) ;
@@ -174,7 +174,7 @@ fn execute_clang_ql_query(
174174 & query,
175175 Diagnostic :: exception ( & evaluation_result. err ( ) . unwrap ( ) ) ,
176176 ) ;
177- return ;
177+ std :: process :: exit ( 1 ) ;
178178 }
179179
180180 // Render the result only if they are selected groups not any other statement
0 commit comments