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

New line issues with comments on Windows with CRLF EOL #192

Open
06393993 opened this issue Jul 11, 2024 · 0 comments
Open

New line issues with comments on Windows with CRLF EOL #192

06393993 opened this issue Jul 11, 2024 · 0 comments

Comments

@06393993
Copy link

With the following yaml with a proper newline at EOF on Windows:

k:
  - a: 1
    # abcd
    b: 2

yamlfmt seems to always want to add an unnecessary new line after the comment:

PS> del $env:USERPROFILE/go/bin/yamlfmt.exe
PS> go install github.com/google/yamlfmt/cmd/yamlfmt@main
PS> & "$env:USERPROFILE/go/bin/yamlfmt" --version
yamlfmt dev (none)
PS> & "$env:USERPROFILE/go/bin/yamlfmt" -lint test.yaml
The following formatting differences were found:

test.yaml:
  k:          k:
    - a: 1      - a: 1
      # abcd      # abcd
+
      b: 2        b: 2

I don't set up any format configurations. This issue is probably related to #34.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant