LLNL / scraper

Python library for getting metadata from source code hosting tools
MIT License
49 stars 23 forks source link

Add handling for empty JSON output from `cloc` #79

Closed mcdonnnj closed 3 months ago

mcdonnnj commented 3 months ago

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.

IanLee1521 commented 3 months ago

Thanks!