Skip to content

Setting different offset breaks hte pre-commit-hook config #43

@zemzale

Description

@zemzale

I am trying to run different formatting option than the default

    args: [--mapping, '2', --sequence, '2', --offset, '2', --width, '150']

After setting offset to 2 I try to commit the changes and the format breaks the config itself by doing these changes

 ---
 repos:
-- repo: https://github.com/pre-commit/pre-commit-hooks
+  - repo: https://github.com/pre-commit/pre-commit-hooks
   rev: v4.2.0
   hooks:
-  - id: check-yaml
-  - id: check-ast
+    - id: check-yaml
+    - id: check-ast

Example of the config before

---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
  rev: v4.2.0
  hooks:
  - id: check-yaml
  - id: check-ast
  - id: trailing-whitespace
  - id: check-added-large-files
  - id: debug-statements
  - id: detect-private-key
  - id: requirements-txt-fixer
  - id: name-tests-test

After the format

---
repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
  rev: v4.2.0
  hooks:
    - id: check-yaml
    - id: check-ast
          #- id: end-of-file-fixer
    - id: trailing-whitespace
    - id: check-added-large-files
    - id: debug-statements
    - id: detect-private-key
    - id: requirements-txt-fixer
    - id: name-tests-test

i have no idea what is causing this, but in need for more info I can help out with something.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions