-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Python: Regexp: Handle repetions {n} (with no ,) #3500
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
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
b56545b
Python: Regexp: Handle repetions {n} (with no ,)
yoff 4d6ad32
Python: Update test expectations.
yoff f1efdee
Python: re test with \Z
yoff 6b168de
Python: re, handle \Z
yoff b5703cd
Python: link to FP report in test file
yoff 226c295
Python: format
yoff 6e9c48b
Python: test zero iterations
yoff f6c59ab
Merge branch 'master' of github.com:github/codeql into UnmatchableDollar
yoff File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -207,9 +207,9 @@ | |
| ax{3,} | sequence | 0 | 6 | | ||
| ax{3} | char | 0 | 1 | | ||
| ax{3} | char | 1 | 2 | | ||
| ax{3} | char | 2 | 3 | | ||
| ax{3} | char | 3 | 4 | | ||
| ax{3} | char | 4 | 5 | | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not sure why 4-5 is in there, but both that and removing 2-3 is consistent with how |
||
| ax{3} | qualified | 1 | 5 | | ||
| ax{3} | sequence | 0 | 5 | | ||
| ax{,3} | char | 0 | 1 | | ||
| ax{,3} | char | 1 | 2 | | ||
|
6 changes: 3 additions & 3 deletions
6
python/ql/test/query-tests/Expressions/Regex/DuplicateCharacterInSet.expected
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
| test.py:41:12:41:18 | Str | This regular expression includes duplicate character 'A' in a set of characters. | | ||
| test.py:42:12:42:19 | Str | This regular expression includes duplicate character '0' in a set of characters. | | ||
| test.py:43:12:43:21 | Str | This regular expression includes duplicate character '-' in a set of characters. | | ||
| test.py:46:12:46:18 | Str | This regular expression includes duplicate character 'A' in a set of characters. | | ||
| test.py:47:12:47:19 | Str | This regular expression includes duplicate character '0' in a set of characters. | | ||
| test.py:48:12:48:21 | Str | This regular expression includes duplicate character '-' in a set of characters. | |
2 changes: 1 addition & 1 deletion
2
python/ql/test/query-tests/Expressions/Regex/UnmatchableCaret.expected
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
| test.py:4:12:4:19 | Str | This regular expression includes an unmatchable caret at offset 1. | | ||
| test.py:5:12:5:23 | Str | This regular expression includes an unmatchable caret at offset 5. | | ||
| test.py:6:12:6:21 | Str | This regular expression includes an unmatchable caret at offset 2. | | ||
| test.py:74:12:74:27 | Str | This regular expression includes an unmatchable caret at offset 8. | | ||
| test.py:79:12:79:27 | Str | This regular expression includes an unmatchable caret at offset 8. | |
2 changes: 1 addition & 1 deletion
2
python/ql/test/query-tests/Expressions/Regex/UnmatchableDollar.expected
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
| test.py:29:12:29:19 | Str | This regular expression includes an unmatchable dollar at offset 3. | | ||
| test.py:30:12:30:23 | Str | This regular expression includes an unmatchable dollar at offset 3. | | ||
| test.py:31:12:31:20 | Str | This regular expression includes an unmatchable dollar at offset 2. | | ||
| test.py:75:12:75:26 | Str | This regular expression includes an unmatchable dollar at offset 3. | | ||
| test.py:80:12:80:26 | Str | This regular expression includes an unmatchable dollar at offset 3. | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.