-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
Fail if metadata.json has no proper newline #154
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thinking out loud: is there a chance someone runs this interactively and passes it in via stdin? It may be too much of an edge case to care about, but users may do echo '{}' | metadata-json-lint /dev/stdin
to only verify the schema. I can see editors with language servers apply this technique.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
echo '{}' | metadata-json-lint /dev/stdin works with this branch and on the master branch
That surprises me. I'd have expected that to fail on a missing newline. Now that I think about it, echo
adds that. So a way to force this failure is echo -n '{}' | metadata-json-lint /dev/stdin
Since ages, it's in our style guide that files need to end with a newline (https://voxpupuli.org/docs/reviewing_pr/), also the FHS demands it.
Should be rebased after #152 is merged.
Since ages, it's in our style guide that files need to end with a newline (https://voxpupuli.org/docs/reviewing_pr/), also the FHS demands it.