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

vet: skip tests

This commit is contained in:
Alexander Medvednikov 2020-08-12 18:56:06 +02:00
parent f8be2110ec
commit 3b5d56278f

View File

@ -29,12 +29,19 @@ fn main() {
is_verbose: '-verbose' in args || '-v' in args
}
for path in paths {
println(path)
if path.ends_with('_test.v') || path.contains('/tests/') {
continue
}
if path.ends_with('.v') {
vet_options.vet_file(path)
} else if os.is_dir(path) {
vet_options.vprintln("vetting folder '$path'...")
files := os.walk_ext(path, '.v')
for file in files {
if file.ends_with('_test.v') || file.contains('/tests/') { // TODO copy pasta
continue
}
vet_options.vet_file(file)
}
}