commit: c6ff4177c2e8da51ce66f35c8ca705931a4bea07
parent 0e9fac8c698d80d58ca0a2f383ff64f30a5694a5
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Sat, 11 Feb 2023 22:56:37 +0100
Add reuse to lint target
Diffstat:
3 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
@@ -24,6 +24,7 @@ lint:
SHELLCHECK=${SHELLCHECK} ./test-cmd/shellcheck
${FLAWFINDER} --error-level=4 .
$(MANDOC) -Tlint -Wunsupp,error,warning $(MAN1)
+ $(REUSE) lint
clean:
rm -fr $(EXE)
diff --git a/cmd/args.c b/cmd/args.c
@@ -1,6 +1,5 @@
// Collection of Unix tools, comparable to coreutils
// SPDX-FileCopyrightText: 2017-2022 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
-//
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
#define _POSIX_C_SOURCE 200809L
diff --git a/configure b/configure
@@ -24,6 +24,7 @@ Variables:
FLAWFINDER=BIN
GCOV=BIN
CRAM=BIN
+ REUSE=BIN
CFLAGS=OPTIONS
LDFLAGS=OPTIONS
@@ -94,6 +95,7 @@ MANDOC="${MANDOC:-mandoc}"
SHELLCHECK="${SHELLCHECK:-shellcheck}"
FLAWFINDER="${FLAWFINDER:-flawfinder}"
CRAM="${CRAM:-cram}"
+REUSE="${REUSE:-reuse}"
# Also allow variables through arguments
for i; do
@@ -186,6 +188,14 @@ else
fi
fi
+if check_cmd REUSE "$REUSE"
+then
+ :
+else
+ echo 'Notice: Copyright linting depending on reuse disabled'
+ REUSE="true"
+fi
+
echo
# pkg-config
@@ -217,6 +227,7 @@ MSGFMT = ${MSGFMT}
DBG = ${DBG}
GCOV = ${GCOV}
CRAM = ${CRAM}
+REUSE = ${REUSE}
CFLAGS = ${CFLAGS}
LDFLAGS = ${LDFLAGS}