microsoft / sarif-tools

A set of Python command line tools for working with SARIF files produced by code analysis tools
MIT License
76 stars 19 forks source link

Fixed 🐞 bug in `sarif/loader.py`, to handle files with `BOM` (Hex `EFBBBF`) #20

Closed ManuelBerrueta closed 10 months ago

ManuelBerrueta commented 10 months ago

Fixed bug in sarif/loader.py, where if you have a file starting with BOM (Hex EFBBBF) it will fail to load the file. This update has been tested and it works in files with and without BOM, thus it will handle regular files normally like before.

ManuelBerrueta commented 10 months ago

@balgillo, let me know if you have any questions about this change :)

balgillo commented 10 months ago

Thank you for your PR @ManuelBerrueta, the change looks good to me and will increase compatibility.

Please run poetry run black sarif on the code as there is a ) out of place. Then I will merge the change.

balgillo commented 10 months ago

Never mind, I'll get it merged and then I will run black afterwards

ManuelBerrueta commented 10 months ago

Awesome, thank you! I appreciate it, got really busy and have not been able to spin back to it!