fmt enforce inline first function parameter #68
Describe the bug
fmt formats this
pub fn product_image_rank_update(
mut tx firebird.ClientTransaction,
product_id ID,
image_id ID,
image_rank i32) ! {
}
to this
pub fn product_image_rank_update(mut tx firebird.ClientTransaction,
product_id ID,
image_id ID,
image_rank i32) ! {
}
Reproduction Steps
module main
fn this_function_has_an_excessively_long_name(
total_minutes_v_made_me_cry i32,
minutes_cried_today i32) !i32 {
if minutes_cried_today < 1 {
return error('do not lie to me')
}
return total_minutes_v_made_me_cry + minutes_cried_today
}
Expected Behavior
fmt leaves it alone
Current Behavior
fmt inlines the first parameter
module main
fn this_function_has_an_excessively_long_name(total_minutes_v_made_me_cry i32,
minutes_cried_today i32) !i32 {
if minutes_cried_today < 1 {
return error('do not lie to me')
}
return total_minutes_v_made_me_cry + minutes_cried_today
}
Possible Solution
No response
Additional Information/Context
No response
V version
V 0.5.1 b156327
Environment details (OS name and version, etc.)
| V full version | V 0.5.1 58f18573557247e9c743f7d60e5b3ab783f74479.b156327 |
|---|---|
| OS | linux, "openmamba release 2026.4.1 for x86_64 (rolling)" |
| Processor | 8 cpus, 64bit, little endian, Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz |
| Memory | 15.26GB/31.17GB |
| V executable | /home/einar/.local/lib64/v/v |
| V last modified time | 2026-06-29 06:14:45 |
| V home dir | OK, value: /home/einar/.local/lib64/v |
| VMODULES | OK, value: /home/einar/.vmodules |
| VTMP | OK, value: /tmp/v_1000 |
| Current working dir | OK, value: /home/einar/Documents/projects/vlang/active |
| Git version | git version 2.54.0 |
| V git status | weekly.2026.03-2408-gb1563273 |
| .git/config present | true |
| cc version | cc (GCC) 16.1.0 |
| gcc version | gcc (GCC) 16.1.0 |
| clang version | N/A |
| tcc version | tcc version 0.9.28rc 2025-02-13 HEAD@f8bd136d (x86_64 Linux) |
| tcc git status | thirdparty-linux-amd64 696c1d84 |
| emcc version | N/A |
| glibc version | ldd (GNU libc) 2.43 |
[!NOTE] You can use the 👍 reaction to increase the issue's priority for developers.
Please note that only the 👍 reaction to the issue itself counts as a vote. Other reactions and those to comments will not be taken into account.