ryantimwilson / rpms / systemd

Forked from rpms/systemd a month ago
Clone
be0c12
From 842c676a36abab0d92f1e68de2c8881fd00fdf4b Mon Sep 17 00:00:00 2001
be0c12
From: Frantisek Sumsal <frantisek@sumsal.cz>
be0c12
Date: Tue, 30 Nov 2021 23:40:28 +0100
be0c12
Subject: [PATCH] lgtm: enable more (and potentially useful) queries
be0c12
be0c12
Not all available queries on LGTM are enabled by default, but some of
be0c12
the excluded ones might come in handy, hence let's enable them
be0c12
explicitly.
be0c12
be0c12
(cherry picked from commit 38f36b9f3443b4d2085799c772e901a402b84af3)
be0c12
be0c12
Related: #2017033
be0c12
---
be0c12
 .lgtm.yml | 24 ++++++++++++++++++++++++
be0c12
 1 file changed, 24 insertions(+)
be0c12
be0c12
diff --git a/.lgtm.yml b/.lgtm.yml
be0c12
index 5948d8c2bc..fe93957b67 100644
be0c12
--- a/.lgtm.yml
be0c12
+++ b/.lgtm.yml
be0c12
@@ -1,3 +1,27 @@
be0c12
+---
be0c12
+# vi: ts=2 sw=2 et:
be0c12
+
be0c12
+# Explicitly enable certain checks which are hidden by default
be0c12
+queries:
be0c12
+  - include: cpp/bad-strncpy-size
be0c12
+  - include: cpp/declaration-hides-variable
be0c12
+  - include: cpp/inconsistent-null-check
be0c12
+  - include: cpp/mistyped-function-arguments
be0c12
+  - include: cpp/nested-loops-with-same-variable
be0c12
+  - include: cpp/sizeof-side-effect
be0c12
+  - include: cpp/suspicious-pointer-scaling
be0c12
+  - include: cpp/suspicious-pointer-scaling-void
be0c12
+  - include: cpp/suspicious-sizeof
be0c12
+  - include: cpp/unsafe-strcat
be0c12
+  - include: cpp/unsafe-strncat
be0c12
+  - include: cpp/unsigned-difference-expression-compared-zero
be0c12
+  - include: cpp/unused-local-variable
be0c12
+  - include:
be0c12
+      tags:
be0c12
+        - "security"
be0c12
+        - "correctness"
be0c12
+      severity: "error"
be0c12
+
be0c12
 extraction:
be0c12
   cpp:
be0c12
     prepare: