We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello,
I am using the old upstream project with a pre-commit hook: https://github.com/archoversight/pre-commit-hook-yamlfmt/tree/feature/explicit_end
However when I use the following configuration:
yaml.indent( mapping=2, sequence=2, offset=2, )
Which I would hope would format the following:
--- fail_fast: true repos: - repo: https://github.com/pre-commit/pre-commit-hooks.git rev: v3.2.0 hooks: - id: no-commit-to-branch - id: check-json - id: check-yaml - id: end-of-file-fixer - id: mixed-line-ending - id: trailing-whitespace - repo: https://github.com/archoversight/pre-commit-hook-yamlfmt.git rev: 0.1.0-explicit hooks: - id: yamlfmt args: [--mapping, '4', --sequence, '4', --offset, '2', --explicit_end, --explicit_start] ...
As:
--- fail_fast: true repos: - repo: https://github.com/pre-commit/pre-commit-hooks.git rev: v3.2.0 hooks: - id: no-commit-to-branch - id: check-json - id: check-yaml - id: end-of-file-fixer - id: mixed-line-ending - id: trailing-whitespace - repo: https://github.com/archoversight/pre-commit-hook-yamlfmt.git rev: 0.1.0-explicit hooks: - id: yamlfmt args: [--mapping, '2', --sequence, '2', --offset, '2', --explicit_end, --explicit_start] ...
However instead it formats it as follows:
For some reason it fails to take into account the fact that there is already an offset from the - before printing the next mapping.
-
Setting the sequence to 4 does seem to solve the problem, but it feels weird that this would be required.
4
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello,
I am using the old upstream project with a pre-commit hook: https://github.com/archoversight/pre-commit-hook-yamlfmt/tree/feature/explicit_end
However when I use the following configuration:
Which I would hope would format the following:
As:
However instead it formats it as follows:
For some reason it fails to take into account the fact that there is already an offset from the
-
before printing the next mapping.Setting the sequence to
4
does seem to solve the problem, but it feels weird that this would be required.The text was updated successfully, but these errors were encountered: