Skip to content

Confusing errors for TOML front-matter issues #1517

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

Closed
ehuss opened this issue Mar 10, 2025 · 2 comments · Fixed by #1520
Closed

Confusing errors for TOML front-matter issues #1517

ehuss opened this issue Mar 10, 2025 · 2 comments · Fixed by #1520

Comments

@ehuss
Copy link
Contributor

ehuss commented Mar 10, 2025

I'm running into some problems with the TOML front-matter checks. They look roughly like this:

Error:
   0: markdown file must start with the line `+++`

Location:
   front_matter/src/lib.rs:24

The problem is that it doesn't tell me which file is having the problem, which makes me need to hunt down where it was having an issue (it was not with the file I was currently working on). The same goes for other kinds of errors like:

Error:
   0: TOML parse error at line 1, column 1
   0:   |
   0: 1 | layout = "post"
   0:   | ^^^^^^^^^^^^^^^
   0: missing field `date`
   0:

Location:
   front_matter/src/lib.rs:31
@senekor
Copy link
Contributor

senekor commented Mar 10, 2025

I can improve the error message, but out of curiosity, how did a file you weren't working on cause this error? The ones on master should all pass the test...

@ehuss
Copy link
Contributor Author

ehuss commented Mar 10, 2025

I tend to have various scratch posts or old posts I'm working on that aren't checked in.

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

Successfully merging a pull request may close this issue.

2 participants