1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

builder: skip warnings; pref: move pref creation to pref.v

This commit is contained in:
Alexander Medvednikov
2020-05-16 22:45:38 +02:00
parent 3e4d99a0e3
commit 0845b2cfbe
5 changed files with 186 additions and 171 deletions

View File

@@ -218,7 +218,7 @@ fn (b &Builder) print_warnings_and_errors() {
if b.pref.is_verbose && b.checker.nr_warnings > 1 {
println('$b.checker.nr_warnings warnings')
}
if b.checker.nr_warnings > 0 {
if b.checker.nr_warnings > 0 && !b.pref.skip_warnings {
for i, err in b.checker.warnings {
kind := if b.pref.is_verbose { '$err.reporter warning #$b.checker.nr_warnings:' } else { 'warning:' }
ferror := util.formatted_error(kind, err.message, err.file_path, err.pos)