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

ci: fix warnings/errors due to the vfmt change

This commit is contained in:
Delyan Angelov
2020-10-15 16:17:52 +03:00
parent 50a2b033b7
commit 31ef921ef2
33 changed files with 466 additions and 570 deletions

View File

@ -11,13 +11,19 @@ const (
base_os = 'linux'
os_names = ['linux', 'macos', 'windows']
skip_modules = [
'builtin.bare', 'builtin.js',
'strconv', 'strconv.ftoa', 'hash', 'strings',
'builtin.bare',
'builtin.js',
'strconv',
'strconv.ftoa',
'hash',
'strings',
'crypto.rand',
'os.bare', 'os2',
'picohttpparser', 'picoev',
'os.bare',
'os2',
'picohttpparser',
'picoev',
'szip',
'v.eval'
'v.eval',
]
)
@ -44,7 +50,7 @@ fn main() {
}
for mname in app.modules {
if !app.is_verbose {
eprintln('Checking module: ${mname} ...')
eprintln('Checking module: $mname ...')
}
api_base := app.gen_api_for_module_in_os(mname, base_os)
for oname in os_names {
@ -85,7 +91,7 @@ fn all_vlib_modules() []string {
return modules
}
fn (app App) gen_api_for_module_in_os(mod_name, os_name string) string {
fn (app App) gen_api_for_module_in_os(mod_name string, os_name string) string {
if app.is_verbose {
eprintln('Checking module: ${mod_name:-30} for OS: ${os_name:-10} ...')
}
@ -102,7 +108,7 @@ fn (app App) gen_api_for_module_in_os(mod_name, os_name string) string {
fn_signature := s.stringify(b.table, mod_name)
fn_mod := s.modname()
if fn_mod == mod_name {
fline := '${fn_mod}: $fn_signature'
fline := '$fn_mod: $fn_signature'
res << fline
}
}
@ -113,10 +119,10 @@ fn (app App) gen_api_for_module_in_os(mod_name, os_name string) string {
return res.join('\n')
}
fn (mut app App) compare_api(api_base, api_os, mod_name, os_base, os_target string) {
fn (mut app App) compare_api(api_base string, api_os string, mod_name string, os_base string, os_target string) {
res := util.color_compare_strings(app.diff_cmd, api_base, api_os)
if res.len > 0 {
summary := 'Different APIs found for module: `${mod_name}`, between OS base: `${os_base}` and OS: `${os_target}`'
summary := 'Different APIs found for module: `$mod_name`, between OS base: `$os_base` and OS: `$os_target`'
eprintln(term.header(summary, '-'))
eprintln(res)
eprintln(term.h_divider('-'))