Visitar URL original
Python: Support `a` (ASCII) inline regex flag by Marcono1234 · Pull Request #15390 · github/codeql · GitHub
The Wayback Machine - https://web.archive.org/web/20240126101729/https://github.com/github/codeql/pull/15390
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

Python: Support a (ASCII) inline regex flag #15390

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Marcono1234
Copy link
Contributor

Split off from #15345, see description and comments there

Comment on lines +62 to +65
#Group with inline flags
re.compile("(?aimsx:a+)")
re.compile("(?-imsx:a+)")
re.compile("(?a-imsx:a+)")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The - and : in these are not properly handled yet (and therefore some of the .expected entries are incorrect). Should I omit these?

Copy link
Contributor

Choose a reason for hiding this comment

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

We should modify the .expected files to make the tests pass.

you could simply add a comment to this test file (either on line 62 or on each of 63-65) noting that this is not handled correctly.

The machinery to both log your actual expectation and have the test pass does exist in the form of inline expectation tests (where you can write MISSING and SPURIOUS). If you want to go down that route instead, see GroupTest in SubstructureTests.ql and groupTest.py.

@yoff yoff self-assigned this Jan 23, 2024
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.

None yet

2 participants