-
-
Notifications
You must be signed in to change notification settings - Fork 778
Closed
Description
pre-commit
check for added large files..............................................Passed
check for case conflicts.................................................Passed
check that executables have shebangs.................(no files to check)Skipped
check json...............................................................Failed
- hook id: check-json
- exit code: 1
.vscode/extensions.json: Failed to json decode (Expecting value: line 12 column 5 (char 284))
.vscode/settings.json: Failed to json decode (Expecting property name enclosed in double quotes: line 4 column 5 (char 45))
check for merge conflicts................................................Passed
check that scripts with shebangs are executable..........................Passed
check for broken symlinks............................(no files to check)Skipped
check vcs permalinks.....................................................Passed
check yaml...............................................................Passed
detect destroyed symlinks................................................Passed
fix end of files.........................................................Passed
trim trailing whitespace.................................................Passed
pretty format json.......................................................Failed
- hook id: pretty-format-json
- exit code: 1
Input File .vscode/extensions.json is not a valid JSON, consider using check-json
Input File .vscode/settings.json is not a valid JSON, consider using check-json
Google (or Palantir) Java Formatter..................(no files to check)Skipped
Pretty format YAML.......................................................Passed
nixfmt-nix...........................................(no files to check)Skipped
Check .editorconfig rules................................................Passed
It's because my .vscode/extensions.json & .vscode/settings.json contain // comments, because VSC's "JSON" is really https://jsonc.org.
Perhaps the check-json and pretty-format-json could be more lenient, and allow this? It could be implemented with https://pypi.org/project/json-with-comments/ (or https://github.com/NickolaiBeloguzov/jsonc-parser, but that one seems less actively maintained; and probably not https://pypi.org/project/commentjson/, as that allows Python style # comments, which is not https://jsonc.org).
Would a PR for this be welcome? Or do you want to be completely "strict", even for this?
I'll also raise an issue at VSC about this.
The work-around is config to ignore.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels