mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vvet: fix segfault on v vet .
This commit is contained in:
parent
d5b837e808
commit
a552674254
@ -10,13 +10,13 @@ const (
|
||||
]
|
||||
skip_on_musl = []string{}
|
||||
skip_on_ubuntu_musl = [
|
||||
// 'vlib/v/gen/js/jsgen_test.v',
|
||||
'vlib/net/http/cookie_test.v',
|
||||
'vlib/net/http/http_test.v',
|
||||
'vlib/net/websocket/ws_test.v',
|
||||
'vlib/sqlite/sqlite_test.v',
|
||||
'vlib/orm/orm_test.v',
|
||||
'vlib/clipboard/clipboard_test.v',
|
||||
// 'vlib/v/gen/js/jsgen_test.v',
|
||||
]
|
||||
skip_on_linux = []string{}
|
||||
skip_on_non_linux = [
|
||||
|
@ -120,7 +120,7 @@ pub fn new_scanner(text string, comments_mode CommentsMode, pref &pref.Preferenc
|
||||
|
||||
pub fn new_vet_scanner(text string, comments_mode CommentsMode, pref &pref.Preferences, vet_errors &[]string) &Scanner {
|
||||
is_fmt := pref.is_fmt
|
||||
s := &Scanner{
|
||||
mut s := &Scanner{
|
||||
pref: pref
|
||||
text: text
|
||||
is_print_line_on_error: true
|
||||
@ -130,6 +130,7 @@ pub fn new_vet_scanner(text string, comments_mode CommentsMode, pref &pref.Prefe
|
||||
comments_mode: comments_mode
|
||||
vet_errors: vet_errors
|
||||
}
|
||||
s.file_path = 'internal_memory'
|
||||
return s
|
||||
}
|
||||
|
||||
@ -1360,7 +1361,12 @@ pub fn (s &Scanner) error(msg string) {
|
||||
}
|
||||
|
||||
fn (mut s Scanner) vet_error(msg string) {
|
||||
s.vet_errors << '$s.file_path:$s.line_nr: $msg'
|
||||
eline := '$s.file_path:$s.line_nr: $msg'
|
||||
if s.vet_errors == 0 {
|
||||
eprintln(eline)
|
||||
return
|
||||
}
|
||||
s.vet_errors << eline
|
||||
}
|
||||
|
||||
pub fn verror(s string) {
|
||||
|
Loading…
Reference in New Issue
Block a user