mirror of
https://github.com/vlang/v.git
synced 2025-09-13 17:36:52 -04:00
vet: optimize performance for path detection, when vetting files (#21139)
This commit is contained in:
parent
030a85c2d0
commit
a015824eef
@ -64,14 +64,11 @@ fn main() {
|
|||||||
}
|
}
|
||||||
if os.is_dir(path) {
|
if os.is_dir(path) {
|
||||||
vt.vprintln("vetting folder: '${path}' ...")
|
vt.vprintln("vetting folder: '${path}' ...")
|
||||||
vfiles := os.walk_ext(path, '.v')
|
os.walk(path, fn [mut vt] (p string) {
|
||||||
vvfiles := os.walk_ext(path, '.vv')
|
if p.ends_with('.v') || p.ends_with('.vv') {
|
||||||
mut files := []string{}
|
vt.vet_file(p)
|
||||||
files << vfiles
|
}
|
||||||
files << vvfiles
|
})
|
||||||
for file in files {
|
|
||||||
vt.vet_file(file)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
vfmt_err_count := vt.errors.filter(it.fix == .vfmt).len
|
vfmt_err_count := vt.errors.filter(it.fix == .vfmt).len
|
||||||
|
Loading…
x
Reference in New Issue
Block a user