Skip to content

Commit 5e53124

Browse files
committed
don't report warning for deprecated classes/predicates
1 parent d816f7f commit 5e53124

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

ql/ql/src/queries/style/docs/ClassDocs.ql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@ predicate badStyle(string s) {
2222
from Class c
2323
where
2424
badStyle(c.getQLDoc().getContents()) and
25-
not c.isPrivate()
25+
not c.isPrivate() and
26+
not c.hasAnnotation("deprecated")
2627
select c.getQLDoc(), "The QLDoc for a class should start with 'A', 'An', or 'The'."

ql/ql/src/queries/style/docs/PredicateDocs.ql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ string docLines(Predicate pred) {
1818
from Predicate pred, string message
1919
where
2020
not pred.isPrivate() and
21+
not pred.hasAnnotation("deprecated") and
2122
// only considering qldocs that look like a class-doc, to avoid reporting way too much.
2223
docLines(pred).matches(["A", "An", "The"] + " %") and // looks like a class doc.
2324
not pred instanceof NewTypeBranch and // <- these are actually kinda class-like.

0 commit comments

Comments
 (0)