@@ -44,7 +44,10 @@ private string getAMentionedNonParameter(Predicate p) {
44
44
not result .toLowerCase ( ) = getAParameterName ( p ) .toLowerCase ( ) and
45
45
// keywords
46
46
not result =
47
- [ "true" , "false" , "NaN" , "this" , "forall" , "exists" , "null" , "break" , "return" , "not" ] and
47
+ [
48
+ "true" , "false" , "NaN" , "this" , "forall" , "exists" , "null" , "break" , "return" , "not" , "if" ,
49
+ "then" , "else" , "import"
50
+ ] and
48
51
not result = any ( Aggregate a ) .getKind ( ) and // min, max, sum, count, etc.
49
52
not result = getMentionedThings ( p .getLocation ( ) .getFile ( ) ) and
50
53
not result = any ( Annotation a ) .getName ( ) and // private, final, etc.
@@ -66,7 +69,7 @@ private string getMentionedThings(File file) {
66
69
private string getAnUndocumentedParameter ( Predicate p ) {
67
70
result = getAParameterName ( p ) and
68
71
not result .toLowerCase ( ) = getADocumentedParameter ( p ) .toLowerCase ( ) and
69
- not result = [ "config" , "conf" , "cfg" ] and // DataFlow configurations are often undocumented, and that's fine.
72
+ not result = [ "config" , "conf" , "cfg" , "t" , "t2" ] and // DataFlow configurations / type-trackers are often undocumented, and that's fine.
70
73
not (
71
74
// "the given" often refers to the first parameter.
72
75
p .getQLDoc ( ) .getContents ( ) .regexpMatch ( "(?s).*\\bthe given\\b.*" ) and
@@ -85,7 +88,7 @@ private string getMentionedNonParameters(Predicate p) {
85
88
}
86
89
87
90
from Predicate p
88
- where not p .getLocation ( ) .getFile ( ) .getBaseName ( ) = "Aliases.qll" // these are OK
91
+ where not p .getLocation ( ) .getFile ( ) .getBaseName ( ) in [ "Aliases.qll" , "TreeSitter.qll" ] // these are OK
89
92
select p ,
90
93
"The QLDoc has no documentation for " + getUndocumentedParameters ( p ) + ", but the QLDoc mentions "
91
94
+ getMentionedNonParameters ( p )
0 commit comments