From 0f1539ffb6be9041c8fc8b4bbd2ea5037a180b49 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Wed, 28 Jan 2026 07:16:42 +0200 Subject: [PATCH] ci: use vfmt off/on tags to make sure that the vfmt jobs pass again after afb19ce --- vlib/os/filepath.v | 2 ++ vlib/os/os.c.v | 2 ++ vlib/v2/ssa/optimize/fold.v | 2 ++ 3 files changed, 6 insertions(+) diff --git a/vlib/os/filepath.v b/vlib/os/filepath.v index 416dff2ea..49c86dc2f 100644 --- a/vlib/os/filepath.v +++ b/vlib/os/filepath.v @@ -297,7 +297,9 @@ fn is_normal_path(path string) bool { if plen == 0 { return false } + // vfmt off return (plen == 1 && is_slash(path[0])) || (plen >= 2 && is_slash(path[0]) && !is_slash(path[1])) + // vfmt on } // is_curr_dir_ref returns `true` if the 3 given integer construct diff --git a/vlib/os/os.c.v b/vlib/os/os.c.v index 9158cfbd2..3804b0eb1 100644 --- a/vlib/os/os.c.v +++ b/vlib/os/os.c.v @@ -951,12 +951,14 @@ fn normalize_drive_letter(path string) { // a path like c:\nv\.bin (note the small `c`) in %PATH, // is NOT recognized by cmd.exe (and probably other programs too)... // Capital drive letters do work fine. + // vfmt off if path.len > 2 && path[0] >= `a` && path[0] <= `z` && path[1] == `:` && path[2] == path_separator[0] { unsafe { x := &path.str[0] (*x) = *x - 32 } } + // vfmt on } // fork will fork the current system process and return the pid of the fork. diff --git a/vlib/v2/ssa/optimize/fold.v b/vlib/v2/ssa/optimize/fold.v index 511a6fad6..5983671bb 100644 --- a/vlib/v2/ssa/optimize/fold.v +++ b/vlib/v2/ssa/optimize/fold.v @@ -31,7 +31,9 @@ fn constant_fold(mut m ssa.Module) bool { } // Try algebraic simplifications first (even with non-constants) + // vfmt off repl, needs_zero := try_algebraic_simplify(m, val_id, instr, lhs, rhs) + // vfmt on if repl >= 0 { if needs_zero { // x * 0 or x & 0 - create zero constant -- 2.39.5