File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
ql/src/queries/style/docs Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change 1+ /**
2+ * @name Missing QLDoc.
3+ * @description Library classes should have QLDoc.
4+ * @kind problem
5+ * @problem.severity recommendation
6+ * @id ql/missing-qldoc
7+ * @tags maintainability
8+ * @precision high
9+ */
10+
11+ import ql
12+
13+ from File f , Class c
14+ where
15+ f = c .getLocation ( ) .getFile ( ) and
16+ not exists ( c .getQLDoc ( ) ) and // no QLDoc
17+ f .getExtension ( ) = "qll" and // in a library
18+ not c .isPrivate ( ) and // class is public
19+ not exists ( Module m |
20+ m .getAMember * ( ) = c and
21+ m .isPrivate ( ) // modules containing the class are public
22+ ) and
23+ not exists ( c .getAliasType ( ) ) and // class is not just an alias
24+ not f .getParentContainer * ( ) .getBaseName ( ) .toLowerCase ( ) = [ "internal" , "experimental" , "test" ] // exclusions
25+ select c , "This library class should have QLDoc."
You can’t perform that action at this time.
0 commit comments