vet: skip tests

pull/6117/head
Alexander Medvednikov 2020-08-12 18:56:06 +02:00
parent f8be2110ec
commit 3b5d56278f
1 changed files with 7 additions and 0 deletions

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)
}
}