maat-scripts
maat-scripts copied to clipboard
MacOS: csv_as_enclosure_json.py is not calculating weight
It looks like the fix introduced in https://github.com/adamtornhill/maat-scripts/issues/6 has problems with parsing the cloc
output on MacOS. The output contains ./
at the start there and that fails to match with the other file then, e. g.:
language,filename,blank,comment,code,"github.com/AlDanial/cloc v 1.84 T=3.30 s (770.2 files/s, 63550.3 lines/s)"
YAML,./api/shareboards/lib/tests/cassettes/test_box_client_get_all_files_from_shared_item.yaml,0,0,2427
JSON,./frontend/src/translations/en.json,0,0,1990
JSON,./frontend/src/translations/de.json,0,0,1990
JSON,./frontend/src/translations/ja.json,0,0,1990
When I reintroduced the [2:]
that was removed in https://github.com/adamtornhill/maat-scripts/commit/50348f79321a7c4502fe08c7f5bf20b663791d4a#diff-8b05bc8468d5386e008aa65a09d1bb29 it is working again
I installed cloc
via brew install cloc
, maybe this is not the correct version?
The same problem applies here as well. I have fixed the code as shown here: b4122e1.
Unfortunately I have seen this issue here later and thus moved my original fix to the better place in the linked commit.
Edit: Please note that my commits are based upon @HelgeCPH 's python3 migration. We are discussing them in pull request https://github.com/adamtornhill/maat-scripts/pull/7 .