mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vet: prohibit spaces before )
This commit is contained in:
parent
54da8371ac
commit
2a696cb837
@ -779,6 +779,10 @@ fn (mut s Scanner) text_scan() token.Token {
|
|||||||
return s.new_token(.lpar, '', 1)
|
return s.new_token(.lpar, '', 1)
|
||||||
}
|
}
|
||||||
`)` {
|
`)` {
|
||||||
|
// TODO `$if vet {` for performance
|
||||||
|
if s.pref.is_vet && s.text[s.pos - 1] == ` ` {
|
||||||
|
println('$s.file_path:$s.line_nr: Looks like you are adding a space before `)`')
|
||||||
|
}
|
||||||
return s.new_token(.rpar, '', 1)
|
return s.new_token(.rpar, '', 1)
|
||||||
}
|
}
|
||||||
`[` {
|
`[` {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user