mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
fmt: allow fmt to be run on directories (#6613)
This commit is contained in:
parent
ee0baf62ad
commit
a2fba05218
@ -83,6 +83,11 @@ fn main() {
|
||||
}
|
||||
mut files := []string{}
|
||||
for file in possible_files {
|
||||
if os.is_dir(file) {
|
||||
files << os.walk_ext(file, '.v')
|
||||
files << os.walk_ext(file, '.vsh')
|
||||
continue
|
||||
}
|
||||
if !file.ends_with('.v') && !file.ends_with('.vv') && !file.ends_with('.vsh') {
|
||||
verror('v fmt can only be used on .v files.\nOffending file: "$file"')
|
||||
continue
|
||||
|
Loading…
Reference in New Issue
Block a user