ci: fix `v vet` filtering
parent
9478ff472f
commit
1a96bcf405
|
@ -29,8 +29,12 @@ fn main() {
|
||||||
is_verbose: '-verbose' in args || '-v' in args
|
is_verbose: '-verbose' in args || '-v' in args
|
||||||
}
|
}
|
||||||
for path in paths {
|
for path in paths {
|
||||||
println(path)
|
if !os.exists(path) {
|
||||||
if path.ends_with('_test.v') || path.contains('/tests/') {
|
eprintln('File/folder $path does not exist')
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if path.ends_with('_test.v') || (path.contains('/tests/') && !path.contains('vlib/v/vet/')) {
|
||||||
|
eprintln('skipping $path')
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if path.ends_with('.v') {
|
if path.ends_with('.v') {
|
||||||
|
|
|
@ -8,7 +8,8 @@ fn test_vet() {
|
||||||
os.chdir(vroot)
|
os.chdir(vroot)
|
||||||
test_dir := 'vlib/v/vet/tests'
|
test_dir := 'vlib/v/vet/tests'
|
||||||
tests := get_tests_in_dir(test_dir)
|
tests := get_tests_in_dir(test_dir)
|
||||||
assert check_path(vexe, test_dir, tests) == 0
|
fails := check_path(vexe, test_dir, tests)
|
||||||
|
assert fails == 0
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_tests_in_dir(dir string) []string {
|
fn get_tests_in_dir(dir string) []string {
|
||||||
|
|
Loading…
Reference in New Issue