mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vfmt: fix match x { 10 /* ... */ {} }
and a := [1/* x */, /* y */2, 3]
This commit is contained in:
@ -4,19 +4,24 @@ import os
|
||||
import testing
|
||||
import v.util
|
||||
|
||||
// os.v - // embeded comments, mib := [1/* CTL_KERN */, 14/* KERN_PROC */, 12/* KERN_PROC_PATHNAME */, -1] => comment the rest of the line
|
||||
const (
|
||||
known_failing_exceptions = [
|
||||
'vlib/crypto/aes/const.v', // multiple narrow columns of []string turned to 1 long single column, otherwise works
|
||||
'vlib/vweb/vweb.v', // $for method in T.methods { => $for method in T(methods) { , `return // xx` => parse expr error
|
||||
'vlib/v/gen/js/tests/life.v', // error: unexpected `,`, expecting ), on JS.setInterval(fn () { show(game) game = step(game) }, 500)
|
||||
'vlib/builtin/js/builtin.v', // JS.console.error(s) => JS.error(s), JS.process.exit(c) => JS.exit(c)
|
||||
'vlib/crypto/aes/const.v',
|
||||
/* multiple narrow columns of []string turned to 1 long single column, otherwise works */
|
||||
'vlib/vweb/vweb.v',
|
||||
/* $for method in T.methods { => $for method in T(methods) { , `return // xx` => parse expr error */
|
||||
'vlib/v/gen/js/tests/life.v',
|
||||
/* error: unexpected `,`, expecting ), on JS.setInterval(fn () { show(game) game = step(game) }, 500) */
|
||||
'vlib/builtin/js/builtin.v',
|
||||
/* JS.console.error(s) => JS.error(s), JS.process.exit(c) => JS.exit(c) */
|
||||
'vlib/builtin/js/jsfns_node.js.v',
|
||||
'vlib/builtin/js/jsfns.js.v',
|
||||
'vlib/builtin/js/jsfns_browser.js.v',
|
||||
'vlib/builtin/bare/linuxsys_bare.v', // error: expr(): bad token `asm`, on `asm {}`
|
||||
'vlib/picoev/picoev.v', // the fn args are removed, then `cb fn (picohttpparser.Request, mut picohttpparser.Response)` can not be reparsed
|
||||
'vlib/os/os.v',
|
||||
'vlib/builtin/bare/linuxsys_bare.v',
|
||||
/* error: expr(): bad token `asm`, on `asm {}` */
|
||||
'vlib/picoev/picoev.v',
|
||||
/* the fn args are removed, then `cb fn (picohttpparser.Request, mut picohttpparser.Response)` can not be reparsed */
|
||||
'vlib/os/os.v' /* os.v - `a := [ c'/bin/sh', c'-c', byteptr(cmd.str), 0 ]` */,
|
||||
]
|
||||
)
|
||||
|
||||
|
@ -5,19 +5,19 @@ import testing
|
||||
import v.util
|
||||
|
||||
const (
|
||||
vet_known_failing_exceptions = [
|
||||
vet_known_failing_exceptions = [
|
||||
'nonexistent',
|
||||
]
|
||||
vet_folders = [
|
||||
vet_folders = [
|
||||
'vlib/sqlite',
|
||||
'vlib/v',
|
||||
'cmd/v',
|
||||
'cmd/tools',
|
||||
]
|
||||
verify_known_failing_exceptions = [
|
||||
'nonexistant'
|
||||
'nonexistant',
|
||||
]
|
||||
verify_list = [
|
||||
verify_list = [
|
||||
'vlib/builtin/array.v',
|
||||
'vlib/os/file.v',
|
||||
'vlib/math/bits/bits.v',
|
||||
@ -78,7 +78,8 @@ fn tsession(vargs string, tool_source string, tool_cmd string, tool_args string,
|
||||
|
||||
fn v_test_vetting(vargs string) {
|
||||
vet_session := tsession(vargs, 'vvet.v', 'v vet', 'vet', vet_folders, vet_known_failing_exceptions)
|
||||
verify_session := tsession(vargs, 'vfmt.v', 'v fmt -verify', 'fmt -verify', verify_list, verify_known_failing_exceptions)
|
||||
verify_session := tsession(vargs, 'vfmt.v', 'v fmt -verify', 'fmt -verify', verify_list,
|
||||
verify_known_failing_exceptions)
|
||||
//
|
||||
if vet_session.benchmark.nfail > 0 || verify_session.benchmark.nfail > 0 {
|
||||
eprintln('\n')
|
||||
|
Reference in New Issue
Block a user