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

Parser doesn't propery identify failing line #2199

Open
hartmark opened this issue Nov 15, 2024 · 0 comments
Open

Parser doesn't propery identify failing line #2199

hartmark opened this issue Nov 15, 2024 · 0 comments
Labels

Comments

@hartmark
Copy link

I had a gigantic compose.yaml file that didn't work. jq didn't properly identify the failing line, but YAMLLint did.

I have cleaned up my compose.yaml with a smaller reproducing case.

alpha:
  beta:
    gamma:
      "this is really the faulty line:foo"
      - "this is an okay line:oh yeah!!"

When I run yq it complains about line 2.

% yq compose.yaml
Error: bad file 'compose.yaml': yaml: line 2: did not find expected key

YAMLlint complains on line 5, it's one line off but it really helped me pinpoint the error when the file was hundreds of lines long. My original file had many entries on "gamma"-level.

https://www.yamllint.com/
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant