Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Respect yamllint 'document_start' rule when autofixing yaml #4184

Merged
merged 1 commit into from
Jun 4, 2024

Conversation

elara-leitstellentechnik
Copy link
Contributor

Currently disabling document_start in the .yamllint config (see example below) file isn't applied correctly when autofixing yaml files since ansible specifies yaml version 1.1 which produces the following file header:

%YAML 1.1
---

While ansible-lint automatically removes the %YAML 1.1 line, the document start indicators are leftover.

Example .yamllint

rules:
  document-start:
    present: false

@elara-leitstellentechnik elara-leitstellentechnik requested a review from a team as a code owner May 24, 2024 09:28
@elara-leitstellentechnik elara-leitstellentechnik requested review from audgirka and alisonlhart and removed request for a team May 24, 2024 09:28
@github-actions github-actions bot added the bug label May 24, 2024
@elara-leitstellentechnik elara-leitstellentechnik marked this pull request as draft May 24, 2024 10:20
@ssbarnea ssbarnea self-assigned this May 24, 2024
@elara-leitstellentechnik elara-leitstellentechnik marked this pull request as ready for review June 4, 2024 07:37
@ssbarnea ssbarnea force-pushed the fix/document_start branch from fb65a3d to 634ceac Compare June 4, 2024 10:47
@ssbarnea ssbarnea changed the title Fix: Respect yamllint 'document_start' rule when autofixing yaml Respect yamllint 'document_start' rule when autofixing yaml Jun 4, 2024
@ssbarnea ssbarnea merged commit b5d027c into ansible:main Jun 4, 2024
25 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants