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

Avoid word wrap crash when issue code long #52

Closed balgillo closed 3 days ago

balgillo commented 4 days ago

Add defensive code to avoid trying to run word wrap when there is not enough space on the line due to long issue code. Also added unit test for this function combine_code_and_description that reproduced the issue.

Fixes #51

balgillo commented 3 days ago

Many thanks @debonte for reviewing. I've implemented your suggestions and there are less magic numbers in this cosmetic formatting code now. Please approve or let me know any other comments you have