@@ -44,7 +44,10 @@ private string getAMentionedNonParameter(Predicate p) {
4444 not result .toLowerCase ( ) = getAParameterName ( p ) .toLowerCase ( ) and
4545 // keywords
4646 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
4851 not result = any ( Aggregate a ) .getKind ( ) and // min, max, sum, count, etc.
4952 not result = getMentionedThings ( p .getLocation ( ) .getFile ( ) ) and
5053 not result = any ( Annotation a ) .getName ( ) and // private, final, etc.
@@ -66,7 +69,7 @@ private string getMentionedThings(File file) {
6669private string getAnUndocumentedParameter ( Predicate p ) {
6770 result = getAParameterName ( p ) and
6871 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.
7073 not (
7174 // "the given" often refers to the first parameter.
7275 p .getQLDoc ( ) .getContents ( ) .regexpMatch ( "(?s).*\\bthe given\\b.*" ) and
@@ -85,7 +88,7 @@ private string getMentionedNonParameters(Predicate p) {
8588}
8689
8790from 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
8992select p ,
9093 "The QLDoc has no documentation for " + getUndocumentedParameters ( p ) + ", but the QLDoc mentions "
9194 + getMentionedNonParameters ( p )
0 commit comments