File: fix-Makefile-exclude-hidden-directories-from-shellcheck-p.patch

package info (click to toggle)
dracut 108-5
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 5,400 kB
  • sloc: sh: 25,008; ansic: 5,202; makefile: 348; perl: 186; python: 28; javascript: 19
file content (30 lines) | stat: -rw-r--r-- 925 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From: Benjamin Drung <benjamin.drung@canonical.com>
Date: Fri, 26 Sep 2025 10:31:59 +0200
Subject: fix(Makefile): exclude hidden directories from shellcheck part 2

`find .` also searches in hidden directories (like `.git` or `.pc`). The
`.pc` is used on Debian for patch tracking and should not be searched
for files.

So ignore the top-level hidden directories from shellcheck. See also
commit 7a65d1a1f372 ("fix(Makefile): exclude hidden directories from
shellcheck").

Forwarded: https://github.com/dracut-ng/dracut-ng/pull/1709
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 020d11d..ee1946b 100644
--- a/Makefile
+++ b/Makefile
@@ -319,7 +319,7 @@ ifeq ($(HAVE_SHELLCHECK),yes)
 ifeq ($(HAVE_SHFMT),yes)
 	shellcheck $$(shfmt -f *)
 else
-	find . -name '*.sh' -print0 | xargs -0 shellcheck
+	find * -name '*.sh' -print0 | xargs -0 shellcheck
 endif
 endif