We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 25b3286 commit de2ebe3Copy full SHA for de2ebe3
ql/ql/src/codeql_ql/ast/Ast.qll
@@ -156,13 +156,22 @@ class TopLevel extends TTopLevel, AstNode {
156
}
157
158
QLDoc getQLDocFor(ModuleMember m) {
159
- exists(int i | result = this.getMember(i) and m = this.getMember(i + 1))
+ exists(int i | result = this.getMember(i) and m = this.getMember(i + 1)) and
160
+ (
161
+ m instanceof ClasslessPredicate
162
+ or
163
+ m instanceof Class
164
165
+ m instanceof Module
166
+ )
167
168
169
override string getAPrimaryQlClass() { result = "TopLevel" }
170
171
override QLDoc getQLDoc() {
172
result = this.getMember(0) and
173
+ // it's not the QLDoc for a module member
174
+ not this.getQLDocFor(_) = result and
175
result.getLocation().getStartLine() = 1 // this might not hold if there is a block comment above, and that's the point.
176
177
0 commit comments