Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fmt: formatting interfaces does not pad between field name and type #19540

Closed
islonely opened this issue Oct 10, 2023 · 0 comments · Fixed by #19866
Closed

fmt: formatting interfaces does not pad between field name and type #19540

islonely opened this issue Oct 10, 2023 · 0 comments · Fixed by #19866
Assignees
Labels
Bug This tag is applied to issues which reports bugs. Unit: vfmt Bugs/feature requests, that are related to the `vfmt`, the formatter for V.

Comments

@islonely
Copy link
Contributor

islonely commented Oct 10, 2023

Describe the bug

v fmt <file> does not pad the space between the interface field name and field type with spaces to align the types on the same column like it does with structs.

Reproduction Steps

v fmt <file> on this code:

interface Hex {
        a int
        ab int
        abc int
        abcd int
        abcde int
}

Expected Behavior

output:

interface Hex {
	a      int
	ab     int
	abc    int
	abcd   int
	abcde  int
	abcdef int
}

Current Behavior

output:

interface Hex {
        a int
        ab int
        abc int
        abcd int
        abcde int
}

Possible Solution

No response

Additional Information/Context

No response

V version

V 0.4.2 37e5616

Environment details (OS name and version, etc.)

V full version: V 0.4.2 37e5616
OS: windows, Microsoft Windows 11 Pro v22621 64-bit
Processor: 16 cpus, 64bit, little endian, 

getwd: C:\Users\imado\Documents\cyberian_tiger
vexe: C:\Users\imado\v\v.exe
vexe mtime: 2023-10-09 22:29:31

vroot: OK, value: C:\Users\imado\v
VMODULES: OK, value: C:\Users\imado\.vmodules
VTMP: OK, value: C:\Users\imado\AppData\Local\Temp\v_0

Git version: git version 2.33.1.windows.1
Git vroot status: weekly.2023.40.1-50-g37e5616b
.git/config present: true

CC version: Error: 'cc' is not recognized as an internal or external command,
operable program or batch file.

thirdparty/tcc status: thirdparty-windows-amd64 e90c2620

Note

You can vote for this issue using the 👍 reaction. More votes increase the issue's priority for developers.

Take into account that only the 👍 reaction counts as a vote.
Only reactions to the issue itself will be counted as votes, not comments.

@islonely islonely added the Bug This tag is applied to issues which reports bugs. label Oct 10, 2023
@ArtemkaKun ArtemkaKun added the Unit: vfmt Bugs/feature requests, that are related to the `vfmt`, the formatter for V. label Oct 10, 2023
@felipensp felipensp self-assigned this Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This tag is applied to issues which reports bugs. Unit: vfmt Bugs/feature requests, that are related to the `vfmt`, the formatter for V.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants