Request: `indent` being respected beyond top level
- Dominant language
- Go
- Stars
- 1.8k
- Forks
- 75
- PR merge metrics
- No merged PRs in 30d
Description
The below:
```yaml
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-byte-order-marker
- id: check-docstring-first
- id: requirements-txt-fixer
description: >-
Sorts entries in requirements.txt and removes incorrect entry
for `pkg-resources==0.0.0`.
```
With `-formatter=indent=4,scan_folded_as_literal=true` being passed to `yamlfmt` gets corrected to:
```yaml
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-byte-order-marker
- id: check-docstring-first
- id: requirements-txt-fixer
description: >-
Sorts entries in requirements.txt and removes incorrect entry
for `pkg-resources==0.0.0`.
```
We can see the top level 4-space indent was preserved, but not the nested levels beyond that.
Can we make `indent` be recursive?
Contributor guide
Assessment
This issue has not been assessed yet.