fmt: test automatic import insertion
parent
810a0725ec
commit
6ada43df61
|
@ -160,7 +160,7 @@ fn (foptions &FormatOptions) format_file(file string) {
|
||||||
vfmt_output_path := os.join_path(os.temp_dir(), 'vfmt_' + file_name)
|
vfmt_output_path := os.join_path(os.temp_dir(), 'vfmt_' + file_name)
|
||||||
os.write_file(vfmt_output_path, formatted_content )
|
os.write_file(vfmt_output_path, formatted_content )
|
||||||
if foptions.is_verbose {
|
if foptions.is_verbose {
|
||||||
eprintln('vfmt2 fmt.fmt worked and ${formatted_content.len} bytes were written to ${vfmt_output_path} .')
|
eprintln('fmt.fmt worked and ${formatted_content.len} bytes were written to ${vfmt_output_path} .')
|
||||||
}
|
}
|
||||||
eprintln('${FORMATTED_FILE_TOKEN}${vfmt_output_path}')
|
eprintln('${FORMATTED_FILE_TOKEN}${vfmt_output_path}')
|
||||||
}
|
}
|
||||||
|
|
|
@ -823,10 +823,9 @@ fn (f mut Fmt) call_expr(node ast.CallExpr) {
|
||||||
alias: it.name
|
alias: it.name
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
println(it.name + '!!')
|
// for imp in f.file.imports {
|
||||||
for imp in f.file.imports {
|
// println(imp.mod)
|
||||||
println(imp.mod)
|
// }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {}
|
else {}
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
import time
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
println(time.now())
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
fn main() {
|
||||||
|
println(time.now())
|
||||||
|
}
|
Loading…
Reference in New Issue