Skip to content

QL: update regexes used in QueryDoc.getQueryName() and in QueryDoc.getQueryId()/getQueryLanguage() #12839

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

Merged
merged 1 commit into from
Apr 17, 2023

Conversation

jcogs33
Copy link
Contributor

@jcogs33 jcogs33 commented Apr 16, 2023

This PR suggests updating the regexes used in QueryDoc.getQueryName() and in QueryDoc.getQueryId()/getQueryLanguage().

The regex in QueryDoc.getQueryName() does not work when non-word characters, such as /, are used in the query name. For example, it doesn't work with @name Depending upon JCenter/Bintray as an artifact repository.
This PR proposes updating this regex to allow for any character.

The regex in QueryDoc.getQueryId()/getQueryLanguage() does not work when a second / is used in the id. For example, it doesn't work with @id java/maven/dependency-upon-bintray.
This PR proposes updating this regex to allow for a second slash. Note: the ql/consistent-alert-message query returns additional results once this update is made.

Let me know if there is any reason why either of these updates should not be done.

@jcogs33 jcogs33 marked this pull request as ready for review April 16, 2023 20:38
@jcogs33 jcogs33 requested a review from a team as a code owner April 16, 2023 20:38
Copy link
Contributor

@erik-krogh erik-krogh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 👍

@erik-krogh erik-krogh merged commit 4e49df1 into github:main Apr 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants