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

Avoid word wrap crash when issue code long #52

Merged
merged 2 commits into from
Jul 4, 2024
Merged

Conversation

balgillo
Copy link
Collaborator

@balgillo balgillo commented Jul 3, 2024

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

tests/test_sarif_file_utils.py Outdated Show resolved Hide resolved
tests/test_sarif_file_utils.py Outdated Show resolved Hide resolved
sarif/sarif_file_utils.py Outdated Show resolved Hide resolved
sarif/sarif_file_utils.py Outdated Show resolved Hide resolved
sarif/sarif_file_utils.py Show resolved Hide resolved
sarif/sarif_file_utils.py Show resolved Hide resolved
@balgillo
Copy link
Collaborator Author

balgillo commented Jul 4, 2024

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

@balgillo balgillo merged commit 4bf8cad into main Jul 4, 2024
1 check passed
@debonte debonte deleted the balgillo/wrap-short branch September 19, 2024 17:48
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.

Summary fails for larger input
2 participants