mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
tools: let v fmt
use VTMP too, stabilise v test-cleancode
This commit is contained in:
parent
fb7a5ee3af
commit
aa37382e8d
4 changed files with 20 additions and 16 deletions
|
@ -40,6 +40,7 @@ const (
|
|||
['haiku', '_haiku.v'],
|
||||
['qnx', '_qnx.v'],
|
||||
]
|
||||
vtmp_folder = util.get_vtmp_folder()
|
||||
)
|
||||
|
||||
fn main() {
|
||||
|
@ -174,7 +175,7 @@ fn (foptions &FormatOptions) format_file(file string) {
|
|||
formatted_content := fmt.fmt(file_ast, table, foptions.is_debug)
|
||||
file_name := os.file_name(file)
|
||||
ulid := rand.ulid()
|
||||
vfmt_output_path := os.join_path(os.temp_dir(), 'vfmt_${ulid}_$file_name')
|
||||
vfmt_output_path := os.join_path(vtmp_folder, 'vfmt_${ulid}_$file_name')
|
||||
os.write_file(vfmt_output_path, formatted_content)
|
||||
if foptions.is_verbose {
|
||||
eprintln('fmt.fmt worked and $formatted_content.len bytes were written to $vfmt_output_path .')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue