Skip to content

zig fmt idempotency: fn param doc comment not properly formatted in one go #14654

@ghost

Description

Zig Version

0.11.0-dev.1586+2d017f379

Steps to Reproduce and Observed Behavior

$ cat b.zig
pub fn x(a: u32,
    /// aaa
b: u32, y: u32) void {
    _ = a;
    _ = b;
    _ = y;
}
$ zig fmt b.zig
b.zig
$ zig fmt b.zig
b.zig:1:18: error: same line documentation comment
pub fn x(a: u32, /// aaa
                 ^~~~~~~

Expected Behavior

If there should ultimately be any error, it should happen in the first zig fmt, not in any after that if I haven't changed the file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugObserved behavior contradicts documented or intended behaviorzig fmt

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions