Skip to content

[vfmt] format error #25495

Description

@Jengro777

Describe the bug

When there is only one line in a multi line comment, there is an error in vfmt

Reproduction Steps

module main

/* Can't v fmt */

v fmt -w .

Expected Behavior

format success

Current Behavior

vmain.v:3:1: error: inline comment is deprecated, please use line comment
    1 | module main
    2 |
    3 | /* Can't v fmt */
      | ~~~~~~~~~~~~~~~~~

Internal vfmt error while formatting file: vmain.v.

Possible Solution

No response

Additional Information/Context

No response

V version

V 0.4.12 2d33a7f

Environment details (OS name and version, etc.)

V full version V 0.4.12 9a01667.2d33a7f
OS linux, Deepin 25
Processor 6 cpus, 64bit, little endian, Intel(R) Core(TM) i5-8500B CPU @ 3.00GHz
Memory 0.28GB/7.6GB
V executable /home/Jengro/.vmr/versions/v_versions/v_latest/v
V last modified time 2025-10-14 07:29:37
V home dir OK, value: /home/Jengro/.vmr/versions/v_versions/v_latest
VMODULES OK, value: /home/Jengro/.vmodules
VTMP OK, value: /tmp/v_1000
Current working dir OK, value: /home/Jengro
Git version git version 2.50.1
V git status weekly.2025.29-470-g2d33a7f2
.git/config present true
cc version cc (Deepin 12.3.0-17deepin15) 12.3.0
gcc version gcc (Deepin 12.3.0-17deepin15) 12.3.0
clang version Deepin clang version 17.0.6 (5deepin5)
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 (Debian GLIBC 2.38-6deepin16) 2.38

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugThis tag is applied to issues which reports bugs.

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions