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

[CI] Enable check-json hooks in pre-commit #50366

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ exclude: |
python/ray/dashboard/client/public/|
python/ray/tests/test_cli_patterns|
python/ray/_private/runtime_env/_clonevirtualenv.py|
python/ray/data/examples/data/|
release/release_logs/|
rllib/tests/data|
Comment on lines +9 to +11
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these are generated files.

$ pre-commit run check-json --all-files
check json...............................................................Failed
- hook id: check-json
- exit code: 1

rllib/tests/data/pendulum/small.json: Failed to json decode (Extra data: line 2 column 1 (char 685))
rllib/tests/data/cartpole/small.json: Failed to json decode (Extra data: line 2 column 1 (char 16336))
python/ray/data/examples/data/different-extensions/data.json: Failed to json decode (Expecting value: line 1 column 1 (char 0))
python/ray/data/examples/data/iris.json: Failed to json decode (Extra data: line 2 column 1 (char 95))
rllib/tests/data/cartpole/large.json: Failed to json decode (Extra data: line 2 column 1 (char 63050))
rllib/tests/data/pendulum/large.json: Failed to json decode (Extra data: line 2 column 1 (char 102630))
python/ray/data/examples/data/image-datasets/different-extensions/data.json: Failed to json decode (Expecting value: line 1 column 1 (char 0))
rllib/tests/data/cartpole/cartpole-v1.jsonl/1_000000_000000.json: Failed to json decode (Extra data: line 2 column 1 (char 337))
rllib/tests/data/cartpole/cartpole-v1_large.jsonl/1_000000_000000.json: Failed to json decode (Extra data: line 2 column 1 (char 363))

doc/external/|
doc/source/
)
Expand Down
1 change: 1 addition & 0 deletions ci/lint/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ pre_commit() {
check-import-order
check-cpp-files-inclusion
end-of-file-fixer
check-json
)

for HOOK in "${HOOKS[@]}"; do
Expand Down