mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Added test cases for 'as' prefix
This commit is contained in:
@@ -1,2 +1,3 @@
|
||||
| test.qll:4:11:4:18 | ClasslessPredicate getValue | This predicate starts with 'get' but does not return a value. |
|
||||
| test.qll:25:11:25:28 | ClasslessPredicate getImplementation2 | This predicate starts with 'get' but does not return a value. |
|
||||
| test.qll:31:11:31:17 | ClasslessPredicate asValue | This predicate starts with 'get' but does not return a value. |
|
||||
|
||||
@@ -26,3 +26,12 @@ predicate getImplementation2() { none() }
|
||||
|
||||
// OK -- is an alias
|
||||
predicate getAlias2 = getImplementation2/0;
|
||||
|
||||
// NOT OK -- starts with as and does not return value
|
||||
predicate asValue() { none() }
|
||||
|
||||
// OK -- starts with as but followed by a lowercase letter, probably should be ignored
|
||||
predicate assessment() { none() }
|
||||
|
||||
// OK -- starts with as and returns a value
|
||||
string asString() { result = "string" }
|
||||
|
||||
Reference in New Issue
Block a user