vfmt: run vfmt over v.v, and add it to `v test-cleancode` too

pull/6753/head
Delyan Angelov 2020-11-21 10:24:11 +02:00
parent 650cdef8b4
commit 92d3cff957
2 changed files with 20 additions and 7 deletions

View File

@ -18,6 +18,7 @@ const (
'nonexistant', 'nonexistant',
] ]
vfmt_verify_list = [ vfmt_verify_list = [
'cmd/v/v.v',
'vlib/builtin/array.v', 'vlib/builtin/array.v',
'vlib/os/file.v', 'vlib/os/file.v',
'vlib/math/bits/bits.v', 'vlib/math/bits/bits.v',

View File

@ -10,15 +10,27 @@ import v.util
import v.builder import v.builder
const ( const (
simple_cmd = [ simple_cmd = [
'fmt', 'up', 'vet', 'fmt',
'self', 'tracev', 'symlink', 'bin2v', 'up',
'test', 'test-fmt', 'test-compiler', 'test-fixed', 'test-cleancode', 'vet',
'self',
'tracev',
'symlink',
'bin2v',
'test',
'test-fmt',
'test-compiler',
'test-fixed',
'test-cleancode',
'repl', 'repl',
'complete', 'complete',
'build-tools', 'build-examples', 'build-tools',
'build-examples',
'build-vbinaries', 'build-vbinaries',
'setup-freetype', 'doc', 'doctor' 'setup-freetype',
'doc',
'doctor',
] ]
list_of_flags_that_allow_duplicates = ['cc', 'd', 'define', 'cf', 'cflags'] list_of_flags_that_allow_duplicates = ['cc', 'd', 'define', 'cf', 'cflags']
) )
@ -45,7 +57,7 @@ fn main() {
if command == 'test-vet' { if command == 'test-vet' {
println('Please use `v test-cleancode` instead.') println('Please use `v test-cleancode` instead.')
return return
} }
// Start calling the correct functions/external tools // Start calling the correct functions/external tools
// Note for future contributors: Please add new subcommands in the `match` block below. // Note for future contributors: Please add new subcommands in the `match` block below.
if command in simple_cmd { if command in simple_cmd {