-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Ruby: use the shared regex pack #11245
Conversation
…cations being used slightly differently in the shared pack)
msg = "This regular expression does not match script end tags like </script\\t\\n bar>." | ||
) | ||
} | ||
private import codeql.ruby.regexp.RegExpTreeView::RegexTreeView as TreeView |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like the repetitive RegExpTreeView::RegexTreeView
. Is it really needed to have a RegexTreeView
module in the RegexTreeView
module?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, as explained below I need a reference to a module instead of a file.
I could perhaps just do private import codeql.ruby.regexp.RegExpTreeView
, but this was the thing I ended up with.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me, thanks for splitting the changes in easy to review commits!
I don't really like the double import Impl
statements. Is there a way to avoid exporting the same things twice under different names?
// exporting as RegexTreeView, and in the top-level scope.
import Impl as RegexTreeView
import Impl
I don't think there is another way, if we want to keep backwards compatibility.
|
Yeah, I was afraid of that. Thanks for explaining. Sounds like we don't have much choice. |
the commits should explain what's happening
Evaluation looks fine.