teknoraver / rpms / systemd

Forked from rpms/systemd 3 months ago
Clone

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

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