mirror of
https://github.com/github/codeql.git
synced 2026-02-09 03:31:06 +01:00
New query: Don't use library annotation.
This commit is contained in:
15
ql/src/queries/style/LibraryAnnotation.ql
Normal file
15
ql/src/queries/style/LibraryAnnotation.ql
Normal file
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* @name Use of deprecated annotation
|
||||
* @description The library annotation is deprecated
|
||||
* @kind problem
|
||||
* @problem.severity warning
|
||||
* @id ql/deprecated-annotation
|
||||
* @tags maintainability
|
||||
* @precision very-high
|
||||
*/
|
||||
|
||||
import ql
|
||||
|
||||
from AstNode n
|
||||
where n.hasAnnotation("library") and not n.hasAnnotation("deprecated")
|
||||
select n, "Don't use the library annotation."
|
||||
Reference in New Issue
Block a user