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

vfmt: change all '$expr' to '${expr}' (#16428)

This commit is contained in:
yuyi
2022-11-15 21:53:13 +08:00
committed by GitHub
parent 56239b4a23
commit 017ace6ea7
859 changed files with 7156 additions and 7135 deletions

View File

@ -52,7 +52,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 {
@ -65,9 +65,9 @@ fn main() {
}
howmany := app.api_differences.len
if howmany > 0 {
eprintln(term.header('Found $howmany modules with different APIs', '='))
eprintln(term.header('Found ${howmany} modules with different APIs', '='))
for m in app.api_differences.keys() {
eprintln('Module: $m')
eprintln('Module: ${m}')
}
exit(1)
}
@ -108,7 +108,7 @@ fn (app App) gen_api_for_module_in_os(mod_name string, os_name string) string {
fn_signature := s.stringify(b.table, mod_name, map[string]string{})
fn_mod := s.modname()
if fn_mod == mod_name {
fline := '$fn_mod: $fn_signature'
fline := '${fn_mod}: ${fn_signature}'
res << fline
}
}
@ -122,7 +122,7 @@ fn (app App) gen_api_for_module_in_os(mod_name string, os_name string) string {
fn (mut app App) compare_api(api_base string, api_os string, mod_name string, os_base string, os_target string) {
res := diff.color_compare_strings(app.diff_cmd, rand.ulid(), 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('-'))