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

JSON formatter: show filename on empty input #56524

Merged
merged 3 commits into from
Apr 2, 2022

Conversation

dseguin
Copy link
Member

@dseguin dseguin commented Apr 2, 2022

Summary

None

Purpose of change

(issue reported by Maleclypse and esotericist on discord)

If a PR includes an empty JSON file, the JSON validation check will print a non-obvious error message:

Error, input empty.

(See the relevant GHA run)

Describe the solution

Print the name of the empty file.

Describe alternatives you've considered

Allowing GHA to skip empty files (not ideal, empty JSON files shouldn't be included).

Testing

  1. Push an empty JSON file to this PR
  2. Error message should print the relevant filename (new error message in GHA)
Error, data/json/tmp.json is empty.

Additional context

@github-actions github-actions bot added [C++] Changes (can be) made in C++. Previously named `Code` Code: Tooling Tooling that is not part of the main game but is part of the repo. json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions labels Apr 2, 2022
@github-actions github-actions bot added [JSON] Changes (can be) made in JSON and removed json-styled JSON lint passed, label assigned by github actions labels Apr 2, 2022
@github-actions github-actions bot added the json-styled JSON lint passed, label assigned by github actions label Apr 2, 2022
@dseguin dseguin marked this pull request as ready for review April 2, 2022 05:51
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Apr 2, 2022
@esotericist esotericist merged commit 5c39685 into CleverRaven:master Apr 2, 2022
@dseguin dseguin deleted the json_empty_show_filename branch April 2, 2022 06:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions [C++] Changes (can be) made in C++. Previously named `Code` Code: Tooling Tooling that is not part of the main game but is part of the repo. [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants