checker: replace warning by notice for UTF8 strings validation (fix #24538) (#24543)

This commit is contained in:
Laurent Cheylus 2025-05-21 17:42:46 +02:00 committed by GitHub
parent be49e2bf6c
commit a5c8b4f94a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -134,7 +134,7 @@ const unicode_lit_overflow_message = 'unicode character exceeds max allowed valu
fn (mut c Checker) string_lit(mut node ast.StringLiteral) ast.Type {
valid_utf8 := validate.utf8_string(node.val)
if !valid_utf8 {
c.warn("invalid utf8 string, please check your file's encoding is utf8", node.pos)
c.note("invalid utf8 string, please check your file's encoding is utf8", node.pos)
}
mut idx := 0
for idx < node.val.len {

View File

@ -1,3 +1,3 @@
vlib/v/checker/tests/invalid_utf8_string.vv:1:6: warning: invalid utf8 string, please check your file's encoding is utf8
vlib/v/checker/tests/invalid_utf8_string.vv:1:6: notice: invalid utf8 string, please check your file's encoding is utf8
1 | _ := 'イ簗ヤtxt'
| ~~~~~~~