From 510f8253e5aa851608dd22bdb742ab0677e973e3 Mon Sep 17 00:00:00 2001 From: Anders Schack-Mulligen Date: Fri, 15 Oct 2021 13:35:25 +0200 Subject: [PATCH] QL: New query: Don't use library annotation. --- ql/src/queries/style/LibraryAnnotation.ql | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 ql/src/queries/style/LibraryAnnotation.ql diff --git a/ql/src/queries/style/LibraryAnnotation.ql b/ql/src/queries/style/LibraryAnnotation.ql new file mode 100644 index 00000000000..cf4a4bc8232 --- /dev/null +++ b/ql/src/queries/style/LibraryAnnotation.ql @@ -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."