ci(run-tests): fix data JSON checker error reporting#3722
Merged
tiborsimko merged 1 commit intocernopendata:masterfrom Mar 11, 2025
Merged
Conversation
psaiz
reviewed
Mar 5, 2025
psaiz
reviewed
Mar 5, 2025
scripts/clean_json_file.py
Outdated
| if old_content != new_content: | ||
| if check: | ||
| print(f"[ERROR] File {filename} is badly formatted.") | ||
| sys.exit(1) |
Contributor
There was a problem hiding this comment.
Imagine that there are 10 files failing. The first execution of the script will only show the first file, and exit. Then, the user will fix that one, run the script again and it will fail in the next one.
Wouldn't it be better if it gave the list of all the badly formatted files on the first execution? That would be consistent with the pytest
22e7612 to
393e110
Compare
Fixes a problem with the CI data JSON checker that was not reporting proper error code when checking multiple files.
393e110 to
b0c24a5
Compare
psaiz
approved these changes
Mar 11, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes a problem with the CI data JSON checker that was not reporting proper error code when checking multiple files.