mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
Python: Limit test files
This commit is contained in:
@@ -2,6 +2,8 @@ import python
|
||||
import semmle.python.regex
|
||||
|
||||
from Regex r, int start, int end, int part_start, int part_end
|
||||
where r.alternationOption(start, end, part_start, part_end)
|
||||
where
|
||||
r.getLocation().getFile().getBaseName() = "test.py" and
|
||||
r.alternationOption(start, end, part_start, part_end)
|
||||
select r.getText(), start, end, r.getText().substring(start, end), part_start, part_end,
|
||||
r.getText().substring(part_start, part_end)
|
||||
|
||||
@@ -2,6 +2,8 @@ import python
|
||||
import semmle.python.regex
|
||||
|
||||
from Regex r, int start, int end, int part_start, int part_end
|
||||
where r.groupContents(start, end, part_start, part_end)
|
||||
where
|
||||
r.getLocation().getFile().getBaseName() = "test.py" and
|
||||
r.groupContents(start, end, part_start, part_end)
|
||||
select r.getText(), start, end, r.getText().substring(start, end), part_start, part_end,
|
||||
r.getText().substring(part_start, part_end)
|
||||
|
||||
@@ -2,4 +2,5 @@ import python
|
||||
import semmle.python.regex
|
||||
|
||||
from Regex r
|
||||
where r.getLocation().getFile().getBaseName() = "test.py"
|
||||
select r.getLocation().getStartLine(), r.getAMode()
|
||||
|
||||
@@ -2,5 +2,7 @@ import python
|
||||
import semmle.python.regex
|
||||
|
||||
from Regex r, int start, int end, boolean maybe_empty, boolean may_repeat_forever
|
||||
where r.qualifiedItem(start, end, maybe_empty, may_repeat_forever)
|
||||
where
|
||||
r.getLocation().getFile().getBaseName() = "test.py" and
|
||||
r.qualifiedItem(start, end, maybe_empty, may_repeat_forever)
|
||||
select r.getText(), start, end, maybe_empty, may_repeat_forever
|
||||
|
||||
Reference in New Issue
Block a user