File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -100,14 +100,11 @@ _uninstall-user:
100100
101101# Development targets
102102
103- check-scripts :
104- while read -r script; do shellcheck --exclude=SC1090,SC1091 $$ script; done < tests/files
105-
106- execute-shfmt :
103+ format :
107104 while read -r script; do shfmt -ln=bash -fn -ci -sr -w $$ script; done < tests/files
108105
109- test : check-scripts
110- @echo " All tests passed "
106+ tests :
107+ @./ tests/run_tests.sh
111108
112109docs :
113110 $(MAKE ) -C docs html
@@ -139,9 +136,8 @@ help:
139136 @echo " sudo make uninstall Remove system installation"
140137 @echo " "
141138 @echo " Development:"
142- @echo " make check-scripts Run shellcheck on all scripts"
143- @echo " make execute-shfmt Format scripts with shfmt"
144- @echo " make test Run all tests"
139+ @echo " make tests Run all tests"
140+ @echo " make format Format scripts with shfmt"
145141 @echo " make docs Build documentation"
146142 @echo " make docs-clean Clean documentation build"
147143 @echo " "
@@ -152,5 +148,5 @@ help:
152148.PHONY : install uninstall
153149.PHONY : _install-system _install-system-bin _install-system-src _install-system-utils _install-system-configs _install-system-man
154150.PHONY : _uninstall-system _install-user _uninstall-user
155- .PHONY : check-scripts execute-shfmt test docs docs-clean
151+ .PHONY : format tests docs docs-clean
156152.PHONY : dist clean help
Original file line number Diff line number Diff line change @@ -149,9 +149,8 @@ The package will be created in the parent directory.
149149## Development
150150
151151``` bash
152- make check-scripts # Run shellcheck
153- make execute-shfmt # Format scripts
154- make test # Run all tests
152+ make tests # Run all tests
153+ make format # Format scripts
155154make docs # Build documentation
156155make docs-clean # Clean documentation build
157156make help # Show all targets
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
33#
4- # Copyright (C) 2019 Saalim Quadri <danascape@gmail.com>
4+ # SPDX-FileCopyrightText: 2019 Saalim Quadri <danascape@gmail.com>
55# SPDX-License-Identifier: GPL-3.0-or-later
66#
7+
8+ set -e
9+
10+ SCRIPT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd) "
11+ PROJECT_ROOT=" $( dirname " $SCRIPT_DIR " ) "
12+
13+ echo " Running ShellCheck"
14+ while read -r script; do
15+ echo " Checking: $script "
16+ shellcheck --exclude=SC1090,SC1091 " $PROJECT_ROOT /$script "
17+ done < " $SCRIPT_DIR /files"
18+
19+ echo " "
20+ echo " All tests passed"
You can’t perform that action at this time.
0 commit comments