-
Notifications
You must be signed in to change notification settings - Fork 10
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
Adds support for format operators in SQLQueryParameterization #361
Conversation
src/codemodder/codemods/transformations/remove_empty_string_concatenation.py
Outdated
Show resolved
Hide resolved
ed38ff9
to
32acb6a
Compare
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 great overall. It's a lot of very impressive work, thanks for the effort.
I'm starting to see how some of these pieces could be taken and reused for other kinds of codemods (e.g. xpath injection).
} | ||
|
||
|
||
def parse_formatted_string( |
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 is pretty heroic, nice work. I could have sworn that there was something in the standard library that helped to tokenize format strings but I'm having trouble digging it up right now.
Use Assignment Expression (Walrus) In Conditional Co-authored-by: pixeebot[bot] <104101892+pixeebot[bot]@users.noreply.github.com>
3081549
to
0639c3e
Compare
Quality Gate passedIssues Measures |
Overview
SQLQueryParameterization
will now parameterize queries built with the format operator%
Description
SQLQueryParameterization
will now correctly parameterize queries built with the format operator%
;LinearizeStringExpression
. It takes a string expression and finds all the pieces that composes that string. For example:"1" + a + "2"
will return a list with the nodes that represents"1"
,a
and"2"
;RemoveUnusedVariables
. It removes local assignments that are not referenced anywhere else;format_string_parser
module;Tackles #301.