1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

parser: filter out vet space indent errors inside StringInterLiterals (#9695)

This commit is contained in:
Lukas Neubert
2021-04-12 15:03:22 +02:00
committed by GitHub
parent ada763e0f4
commit b2c16ced57
4 changed files with 27 additions and 13 deletions

View File

@@ -1,5 +1,6 @@
cmd/tools/vvet/tests/indent_with_space.vv:2: error: Looks like you are using spaces for indentation.
cmd/tools/vvet/tests/indent_with_space.vv:10: error: Looks like you are using spaces for indentation.
cmd/tools/vvet/tests/indent_with_space.vv:16: error: Looks like you are using spaces for indentation.
cmd/tools/vvet/tests/indent_with_space.vv:19: error: Looks like you are using spaces for indentation.
cmd/tools/vvet/tests/indent_with_space.vv:17: error: Looks like you are using spaces for indentation.
cmd/tools/vvet/tests/indent_with_space.vv:20: error: Looks like you are using spaces for indentation.
cmd/tools/vvet/tests/indent_with_space.vv:22: error: Looks like you are using spaces for indentation.
NB: You can run `v fmt -w file.v` to fix these errors automatically

View File

@@ -13,8 +13,12 @@ fn block_comments() {
}
fn space_inside_strings() {
// Plain strings
str := "Bad space usage for variable indentation.
Here it's fine.
Here too."
str2 := 'linebreak and space\n inside'
// String interpolation
si1 := 'Error here $foo
and not here'
}