commit: 4f261c2341985ce8f3084660b5f9f66db593f786
parent 3265eaeecf81f4de84c61ab29ffdf53c2e143b5e
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Mon, 21 Feb 2022 23:50:09 +0100
Move linting to own `lint` target
Diffstat:
6 files changed, 26 insertions(+), 20 deletions(-)
diff --git a/Makefile b/Makefile
@@ -4,12 +4,16 @@ all:
cd bin ; $(MAKE)
cd sbin ; $(MAKE)
+.PHONY: test
test: all
+ POSIX_ME_HARDER=1 POSIXLY_CORRECT=1 kyua test || (kyua report --verbose; false)
+
+.PHONY: lint
+lint:
$(SHELLCHECK) ./configure test_all.sh
SHELLCHECK=${SHELLCHECK} ./test-bin/shellcheck
- POSIX_ME_HARDER=1 POSIXLY_CORRECT=1 kyua test || (kyua report --verbose; false)
- cd bin ; $(MAKE) test
- cd sbin ; $(MAKE) test
+ cd bin ; $(MAKE) lint
+ cd sbin ; $(MAKE) lint
clean:
cd bin ; $(MAKE) clean
diff --git a/README b/README
@@ -1,9 +0,0 @@
-Collection of Unix tools, comparable to coreutils
-Copyright 2017-2022 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
-SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
-
-# Dependencies
-* POSIX System (tested on musl+linux and glibc+linux)
-* libbsd or a BSD libc for bin/humanize
-* (for tests) ATF: <https://github.com/jmmv/atf>
-* (for tests) Kyua: <https://github.com/jmmv/kyua>
diff --git a/README.md b/README.md
@@ -0,0 +1,14 @@
+Collection of Unix tools, comparable to coreutils
+Copyright 2017-2022 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
+SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
+
+Tested on Linux(musl), FreeBSD, NetBSD, OpenBSD:
+<https://builds.sr.ht/~lanodan/utils>
+
+# Dependencies
+- POSIX System
+- (optional) libbsd: To build `bin/strings` and `bin/humanize`
+- (optional, test) ATF: <https://github.com/jmmv/atf>
+- (optional, test) Kyua: <https://github.com/jmmv/kyua>
+- (optional, lint) mandoc: for linting the manual pages
+- (optional, lint) shellcheck: for linting `./configure` and shell scripts
diff --git a/bin/Makefile b/bin/Makefile
@@ -6,8 +6,8 @@ SH_SCRIPTS = archive-tags dmenu_path wordsort
PL_SCRIPTS = zalgo
SCRIPTS = $(SH_SCRIPTS) $(PL_SCRIPTS)
-.PHONY: test
-test: all
+.PHONY: lint
+lint:
$(MANDOC) -Tlint -Wunsupp,error,warning $(MAN1)
$(SHELLCHECK) $(SH_SCRIPTS)
diff --git a/configure b/configure
@@ -26,11 +26,7 @@ Variables:
Variables are set in the following order: Default, Environment, Arguments
-Dependencies:
-- libbsd (optionnal), for strings(1) and humanize(1)
-- kyua + atf (optional, test dep)
-- mandoc: for linting the manual pages (optional, test dep)
-- shellcheck: for linting ./configure and shell scripts (optional, test dep)
+Dependencies: See the README.md file
END
}
diff --git a/sbin/Makefile b/sbin/Makefile
@@ -2,7 +2,8 @@ include config.mk
include ../config.mk
include ../Makefile.common
-test: all
+.PHONY: lint
+lint:
:
install: