mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
v vet: give an error for trailing whitespace (#9574)
This commit is contained in:
7
cmd/tools/vvet/tests/trailing_space.out
Normal file
7
cmd/tools/vvet/tests/trailing_space.out
Normal file
@@ -0,0 +1,7 @@
|
||||
cmd/tools/vvet/tests/trailing_space.vv:5: error: Looks like you have trailing whitespace.
|
||||
cmd/tools/vvet/tests/trailing_space.vv:6: error: Looks like you have trailing whitespace.
|
||||
cmd/tools/vvet/tests/trailing_space.vv:7: error: Looks like you have trailing whitespace.
|
||||
cmd/tools/vvet/tests/trailing_space.vv:8: error: Looks like you have trailing whitespace.
|
||||
cmd/tools/vvet/tests/trailing_space.vv:9: error: Looks like you have trailing whitespace.
|
||||
cmd/tools/vvet/tests/trailing_space.vv:13: error: Looks like you have trailing whitespace.
|
||||
cmd/tools/vvet/tests/trailing_space.vv:15: error: Looks like you have trailing whitespace.
|
||||
16
cmd/tools/vvet/tests/trailing_space.vv
Normal file
16
cmd/tools/vvet/tests/trailing_space.vv
Normal file
@@ -0,0 +1,16 @@
|
||||
// NB: This file has and *should* have trailing spaces.
|
||||
// When making changes, please ensure they are not removed.
|
||||
|
||||
fn after_comments() {
|
||||
// spaces after line comments give errors
|
||||
/*
|
||||
in block comments
|
||||
too
|
||||
*/
|
||||
}
|
||||
|
||||
fn main() {
|
||||
var := 'error about the spaces right there'
|
||||
no_err := "inside multi line strings it's fine.
|
||||
but not after"
|
||||
}
|
||||
Reference in New Issue
Block a user