teknoraver / rpms / systemd

Forked from rpms/systemd 3 months ago
Clone

Blame SOURCES/0688-lgtm-enable-more-and-potentially-useful-queries.patch

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