Closed spasalkar-uptycs closed 1 year ago
@spasalkar-uptycs thanks for the report. Could you please post details around the used version of the library and the full report of the error?
Tried to verify it myself and I did not manage to reproduce.
@spasalkar-uptycs if the problem still persists, please open a new issue and provide info about the installed libraries on your virtual environment (specifically language-formatters-pre-commit-hooks
and ruamel.yaml
).
(py311) maci:language-formatters-pre-commit-hooks/ (master✗) $ git rev-parse HEAD [10:27:32]
aea4afc8a43ef9bb825575b6e590815744bb3ab0
(py311) maci:language-formatters-pre-commit-hooks/ (master✗) $ git status [10:27:33]
On branch master
Untracked files:
(use "git add <file>..." to include in what will be committed)
a.yaml
nothing added to commit but untracked files present (use "git add" to track)
(py311) maci:language-formatters-pre-commit-hooks/ (master✗) $ cat a.yaml [10:27:36]
---
apiVersion: test
kind: test
---
apiVersion: test2
kind: test2
---
(py311) maci:language-formatters-pre-commit-hooks/ (master✗) $ pretty-format-yaml a.yaml [10:27:37]
(py311) maci:language-formatters-pre-commit-hooks/ (master✗) $ echo $? [10:27:41]
0
(py311) maci:language-formatters-pre-commit-hooks/ (master✗) $ cat a.yaml [10:27:43]
---
apiVersion: test
kind: test
---
apiVersion: test2
kind: test2
---
(py311) maci:language-formatters-pre-commit-hooks/ (master✗) $ pretty-format-yaml a.yaml [10:27:44]
(py311) maci:language-formatters-pre-commit-hooks/ (master✗) $ pip freeze | grep language-formatters-pre-commit-hooks [10:29:47]
language-formatters-pre-commit-hooks @ file:///Users/maci/github/language-formatters-pre-commit-hooks/.tox/.tmp/package/26/language_formatters_pre_commit_hooks-2.6.0.tar.gz
(py311) maci:language-formatters-pre-commit-hooks/ (master✗) $ pip freeze | grep ruamel.yaml [10:29:49]
ruamel.yaml==0.17.21
(py311) maci:language-formatters-pre-commit-hooks/ (master✗) $ [10:29:58]
@macisamuele It's fixed. Thanks
Multiple yaml content in one file, it fails to validate