Skip to content

Commit e33f7aa

Browse files
committed
Added test cases for 'as' prefix
1 parent 029b567 commit e33f7aa

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
| test.qll:4:11:4:18 | ClasslessPredicate getValue | This predicate starts with 'get' but does not return a value. |
22
| test.qll:25:11:25:28 | ClasslessPredicate getImplementation2 | This predicate starts with 'get' but does not return a value. |
3+
| test.qll:31:11:31:17 | ClasslessPredicate asValue | This predicate starts with 'get' but does not return a value. |

ql/ql/test/queries/style/ValidatePredicateGetReturns/test.qll

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,12 @@ predicate getImplementation2() { none() }
2626

2727
// OK -- is an alias
2828
predicate getAlias2 = getImplementation2/0;
29+
30+
// NOT OK -- starts with as and does not return value
31+
predicate asValue() { none() }
32+
33+
// OK -- starts with as but followed by a lowercase letter, probably should be ignored
34+
predicate assessment() { none() }
35+
36+
// OK -- starts with as and returns a value
37+
string asString() { result = "string" }

0 commit comments

Comments
 (0)