Skip to content

cue fmt adds two newlines instead of one to an empty file #3895

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

Open
DenisGorbachev opened this issue Apr 18, 2025 · 0 comments
Open

cue fmt adds two newlines instead of one to an empty file #3895

DenisGorbachev opened this issue Apr 18, 2025 · 0 comments
Labels
NeedsInvestigation Triage Requires triage/attention

Comments

@DenisGorbachev
Copy link

What version of CUE are you using (cue version)?

cue version v0.12.1

go version go1.24.2
      -buildmode exe
       -compiler gc
       -trimpath true
     CGO_ENABLED 0
          GOARCH arm64
            GOOS darwin
         GOARM64 v8.0
cue.lang.version v0.12.0

Does this issue reproduce with the latest stable release?

Yes

What did you do?

cd $(mktemp -d)
(
set -e
touch example.cue
cue fmt example.cue
cat example.cue
)

What did you expect to see?

One newline.

What did you see instead?

Two newlines.

@DenisGorbachev DenisGorbachev added NeedsInvestigation Triage Requires triage/attention labels Apr 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Triage Requires triage/attention
Projects
None yet
Development

No branches or pull requests

1 participant