-
Notifications
You must be signed in to change notification settings - Fork 33
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
Pre-commit check failing on new JSON file and doesn't report useful line number #359
Comments
JSON doesn't support comments. |
explanation for
|
I can just remove the comments since VSCode put those in automatically and they aren't required. |
Do we have any tools that fail if there isn't an empty line at the end of a text file? I've been in the industry for many years and never had this as a requirement in any file and any tool I've ever used doesn't require an empty line at the end of a file. So, why be burdened by a non-requirement of all the UDB developers to know that all text files must have an empty line at the end? Seems too restrictive and not a good ROI. |
Why doesn't the pre-commit check rule run when I do a commit in VSCode? Derek just told me it was supposed to so something seems broken there. |
Let's not make this pre-commit check too restrictive and annoy our developers. Recently Rafael added a check that you couldn't have trailing whitespace on a line and that created all sorts of problems since many languages allow this. Let's not repeat that situation with UDB. |
It's only going to check files that you staged in the commit, not everything. |
I'm in favor of keeping the rule. It helps to avoid subtle errors when processing/transforming files, which is something we do (and will continue to do) a lot of since our data is in text files. |
Further, your experience should be an outlier; New checkouts (or after doing |
The JSON file in question was staged and then committed so why isn't the pre-commit check running for me? |
I just did a "git fetch" and then a merge from main into a branch I'm getting ready to do a PR. Now I'm seeing this: james@JAMEBALL-P1:/github/riscv-unified-db$ ./do clean |
Okay, what is this all about? Now I've got some ambiguous pre-commit failures on a completely different PR. Why are we doing trailing whitespace checks? If a tool can't handle a text file without an empty line at the end, can't we fix the tool and don't burden everyone who has to edit a text file. Tools should conform to people, not the other way around. |
In PR #358 the pre-commit check fails on a new JSON file I created:
The text was updated successfully, but these errors were encountered: