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

empty list item gets trailing whitespace added #56

Open
commonism opened this issue Oct 31, 2024 · 0 comments
Open

empty list item gets trailing whitespace added #56

commonism opened this issue Oct 31, 2024 · 0 comments

Comments

@commonism
Copy link

The following example is

a:
  -

hard to get right with

  - repo: 'https://github.com/pre-commit/pre-commit-hooks'
    rev: v5.0.0
    hooks:
      - id: trailing-whitespace

  - repo: https://github.com/adrienverge/yamllint.git
    rev: v1.35.1
    hooks:
      - id: yamllint
        args: ["-d", "{extends: relaxed, rules: {empty-lines: disable, line-length: {max: 1500}}}", --strict, --format, parsable]

  - repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
    rev: 0.2.3
    hooks:
      - id: yamlfmt
        args: [--mapping, '2', --sequence, '4', --offset, '2', --preserve-quotes, --implicit_start, --width, '1500']

yamlfmt wants to add a trailing whitespace, the others disagree.
Only option so far is manually exclude file from yamlfmt.

@commonism commonism changed the title empty list item gets traling whitespace added empty list item gets trailing whitespace added Oct 31, 2024
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