Skip to content

nitpick removes YAML document start #621

@jamesbraza

Description

@jamesbraza

Expected behavior

I run yamllint --strict (docs), which checks for the presence of a YAML document start.

I am finding nitpick making extra diff churn because pre-commit configs don't use document start.

Current behavior

When running nitpick, it removes the document start.

Steps to reproduce

  1. Have a .pre-commit-config.yaml that previously has a document start ---
  2. Run nitpick fix to generate an updated .pre-commit-config.yaml
  3. Observe it removed document start ---

Possible Solution

Adding a CLI flag for preserving document starts in YAML somehow.

Context

N/a

Your environment

  • nitpick version used: 0.34.0
  • Python version: 3.12.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    Status

    Upvoted / Requests

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions