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

tools: fix substring in s usages, preventing v -W build-tools

This commit is contained in:
Delyan Angelov
2021-03-23 13:36:50 +02:00
parent f2b73fe3ca
commit ae6420afc7
5 changed files with 18 additions and 15 deletions

View File

@ -49,7 +49,7 @@ fn trim_doc_node_description(description string) string {
if dn_description.len > 80 {
dn_description = dn_description[..80]
}
if '\n' in dn_description {
if dn_description.contains('\n') {
dn_description = dn_description.split('\n')[0]
}
// if \ is last character, it ends with \" which leads to a JS error
@ -99,7 +99,7 @@ fn is_included(path string, ignore_paths []string) bool {
return true
}
for ignore_path in ignore_paths {
if ignore_path !in path {
if !path.contains(ignore_path) {
continue
}
return false

View File

@ -220,22 +220,22 @@ fn main() {
mut asan_compiler := false
mut msan_compiler := false
for arg in args {
if '-asan-compiler' in arg {
if arg.contains('-asan-compiler') {
asan_compiler = true
}
if '-msan-compiler' in arg {
if arg.contains('-msan-compiler') {
msan_compiler = true
}
if '-Werror' in arg {
if arg.contains('-Werror') {
werror = true
}
if '-fsanitize=memory' in arg {
if arg.contains('-fsanitize=memory') {
sanitize_memory = true
}
if '-fsanitize=address' in arg {
if arg.contains('-fsanitize=address') {
sanitize_address = true
}
if '-fsanitize=undefined' in arg {
if arg.contains('-fsanitize=undefined') {
sanitize_undefined = true
}
}