mirror of
https://github.com/vlang/v.git
synced 2025-09-12 08:57:09 -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) {
|
||||
vt.vprintln("vetting folder: '${path}' ...")
|
||||
vfiles := os.walk_ext(path, '.v')
|
||||
vvfiles := os.walk_ext(path, '.vv')
|
||||
mut files := []string{}
|
||||
files << vfiles
|
||||
files << vvfiles
|
||||
for file in files {
|
||||
vt.vet_file(file)
|
||||
}
|
||||
os.walk(path, fn [mut vt] (p string) {
|
||||
if p.ends_with('.v') || p.ends_with('.vv') {
|
||||
vt.vet_file(p)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
vfmt_err_count := vt.errors.filter(it.fix == .vfmt).len
|
||||
|
Loading…
x
Reference in New Issue
Block a user