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

zig fmt can remove comments #3686

Closed
Srekel opened this issue Nov 13, 2019 · 1 comment · Fixed by #3697
Closed

zig fmt can remove comments #3686

Srekel opened this issue Nov 13, 2019 · 1 comment · Fixed by #3697
Labels
bug Observed behavior contradicts documented or intended behavior contributor friendly This issue is limited in scope and/or knowledge of Zig internals. frontend Tokenization, parsing, AstGen, Sema, and Liveness.
Milestone

Comments

@Srekel
Copy link

Srekel commented Nov 13, 2019

Minimal repro case: Open a new file, fmttest.zig for example, add the following two lines of code:

/// test
// test

Format it using zig fmt. Afterwards, there's only a single blank line left.


Tested on Windows using zig-windows-x86_64-0.5.0+d18b5f8b5.zip

@andrewrk andrewrk added this to the 0.6.0 milestone Nov 13, 2019
@andrewrk andrewrk added bug Observed behavior contradicts documented or intended behavior contributor friendly This issue is limited in scope and/or knowledge of Zig internals. frontend Tokenization, parsing, AstGen, Sema, and Liveness. labels Nov 13, 2019
@Vexu
Copy link
Member

Vexu commented Nov 14, 2019

I have this solved for both variations of top-level doc comments I presented here. Alternatively adding a compile error for unattached doc comment would be quite easy if we don't want top-level doc comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Observed behavior contradicts documented or intended behavior contributor friendly This issue is limited in scope and/or knowledge of Zig internals. frontend Tokenization, parsing, AstGen, Sema, and Liveness.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants