vet: accumulate the collected errors manually (fixes CI)
parent
70826914a7
commit
8e5067421f
|
@ -70,6 +70,6 @@ fn (mut vet_options VetOptions) vet_file(path string) {
|
|||
table := table.new_table()
|
||||
vet_options.vprintln("vetting file '$path'...")
|
||||
file_ast, errors := parser.parse_vet_file(path, table, prefs)
|
||||
vet_options.errors = errors
|
||||
vet_options.errors << errors
|
||||
vet.vet(file_ast, table, true)
|
||||
}
|
||||
|
|
|
@ -149,6 +149,7 @@ pub fn parse_vet_file(path string, table_ &table.Table, pref &pref.Preferences)
|
|||
}
|
||||
}
|
||||
file := p.parse()
|
||||
p.vet_errors << p.scanner.vet_errors
|
||||
return file, p.vet_errors
|
||||
}
|
||||
|
||||
|
|
|
@ -1394,10 +1394,6 @@ pub fn (s &Scanner) error(msg string) {
|
|||
|
||||
fn (mut s Scanner) vet_error(msg string) {
|
||||
eline := '$s.file_path:$s.line_nr: $msg'
|
||||
if s.vet_errors.len == 0 {
|
||||
eprintln(eline)
|
||||
return
|
||||
}
|
||||
s.vet_errors << eline
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue