Skip to content

Conversation

sdangol
Copy link
Contributor

@sdangol sdangol commented Aug 26, 2025

Summary

This PR updates the regex used by the function getCodeLocation to get the file and line number in the error stack trace. It prevent slow execution of regex when encountered with string starting with multiple occurrences of ((

Changes

Please provide a summary of what's being changed

  • Added a ( to the regex capture group to prevent matching series of ((

Please add the issue number below, if no issue is present the PR might get blocked and not be reviewed

Issue number: closes #4366


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

@pull-request-size pull-request-size bot added the size/XS PR between 0-9 LOC label Aug 26, 2025
@boring-cyborg boring-cyborg bot added the logger This item relates to the Logger Utility label Aug 26, 2025
@sdangol sdangol self-assigned this Aug 26, 2025
@sdangol sdangol requested a review from dreamorosi August 26, 2025 12:31
@dreamorosi
Copy link
Contributor

Quality Gate Failed Quality Gate failed

Failed conditions C Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

is this SonarCloud finding valid?

@sdangol
Copy link
Contributor Author

sdangol commented Aug 26, 2025

is this SonarCloud finding valid?

Yes, I had accidentally left a duplicate bracket there. I've removed it now

Copy link

@dreamorosi dreamorosi merged commit 801333d into main Aug 27, 2025
37 checks passed
@dreamorosi dreamorosi deleted the improv/logger-error-regex branch August 27, 2025 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
logger This item relates to the Logger Utility size/XS PR between 0-9 LOC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Maintenance: Regular expression to get code location in logger may take more time to make some inputs
3 participants