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

Add handling for empty JSON output from cloc #79

Merged
merged 2 commits into from
May 22, 2024

Conversation

mcdonnnj
Copy link
Contributor

Starting in version 1.96, cloc will output an empty JSON object ({}) instead of nothing if no files are detected. This results in a KeyError on empty repositories instead of a json.decoder.JSONDecodeError. Since this indicates a potentially different issue it is handled in its own escept block. I also had to reformat an otherwise unrelated file to comply with black.

mcdonnnj added 2 commits May 21, 2024 23:55
Starting in version 1.96 of cloc it will output an empty JSON object
(`{}`) instead of nothing if no files are detected.
When running `make test` this file was listed as needing to be
reformatted by black.
@IanLee1521 IanLee1521 merged commit 536a72c into LLNL:main May 22, 2024
10 checks passed
@IanLee1521
Copy link
Member

Thanks!

@mcdonnnj mcdonnnj deleted the bug/fix_cloc_output_handling branch May 22, 2024 04:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants