Skip to content

Commit

Permalink
vet: optimize performance for path detection, when vetting files (#21139
Browse files Browse the repository at this point in the history
)
  • Loading branch information
ttytm committed Mar 29, 2024
1 parent 030a85c commit a015824
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions cmd/tools/vvet/vvet.v
Expand Up @@ -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
Expand Down

0 comments on commit a015824

Please sign in to comment.