File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
ql/ql/src/queries/reports Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -13,15 +13,21 @@ import codeql_ql.ast.internal.TreeSitter
1313
1414date today ( ) { result = any ( Blame:: BlameInfo b ) .getToday ( ) .getValue ( ) .toDate ( ) }
1515
16+ pragma [ nomagic]
17+ Annotation getADeprecatedAnnotationAt ( string filePath , int line ) {
18+ result .getLocation ( ) .getFile ( ) .getRelativePath ( ) = filePath and
19+ result .getLocation ( ) .getStartLine ( ) = line and
20+ result .getName ( ) = "deprecated"
21+ }
22+
1623class DatedDeprecation extends Annotation {
1724 date lastModified ;
1825
1926 DatedDeprecation ( ) {
2027 this .getName ( ) = "deprecated" and
2128 exists ( Blame:: FileEntry f , Blame:: BlameEntry b |
22- f .getFileName ( ) .getValue ( ) = this . getLocation ( ) . getFile ( ) .getRelativePath ( ) and
29+ this = getADeprecatedAnnotationAt ( f .getFileName ( ) .getValue ( ) , b . getLine ( _ ) . getValue ( ) .toInt ( ) ) and
2330 f .getBlameEntry ( _) = b and
24- b .getLine ( _) .getValue ( ) .toInt ( ) = this .getLocation ( ) .getStartLine ( ) and
2531 lastModified = b .getDate ( ) .getValue ( ) .toDate ( )
2632 )
2733 }
You can’t perform that action at this time.
0 commit comments