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

bug: when document start have comments before, formatter moves it on top of the file. #236

Open
vveliev opened this issue Jan 26, 2025 · 0 comments

Comments

@vveliev
Copy link

vveliev commented Jan 26, 2025

When yaml includes comments before document start formatters moves it on the top.

Here is the example yaml file:

# -*- coding: utf-8 -*-
# vim: ft=yaml
# yamllint disable rule:truthy
---
name: ci-pipeline

on:
  pull_request:
  push:
    branches: [main]

when using formatter with this options I'm not expecting any changes
-formatter include_document_start=true,retain_line_breaks_single=true

instead I'm getting this:

---
# -*- coding: utf-8 -*-
# vim: ft=yaml
# yamllint disable rule:truthy
name: ci-pipeline

on:
  pull_request:
  push:
    branches: [main]
Image
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