tools: allow static checks to be run from any directory
This commit is contained in:
parent
59e18df6c8
commit
1adb5852ec
5
dist/tools/coccinelle/check.sh
vendored
5
dist/tools/coccinelle/check.sh
vendored
@ -6,7 +6,10 @@
|
|||||||
# General Public License v2.1. See the file LICENSE in the top level
|
# General Public License v2.1. See the file LICENSE in the top level
|
||||||
# directory for more details.
|
# directory for more details.
|
||||||
|
|
||||||
: "${RIOTTOOLS:=${PWD}/dist/tools}"
|
: "${RIOTBASE:=$(cd $(dirname $0)/../../../; pwd)}"
|
||||||
|
cd $RIOTBASE
|
||||||
|
|
||||||
|
: "${RIOTTOOLS:=${RIOTBASE}/dist/tools}"
|
||||||
. "${RIOTTOOLS}"/ci/changed_files.sh
|
. "${RIOTTOOLS}"/ci/changed_files.sh
|
||||||
|
|
||||||
EXIT_CODE=0
|
EXIT_CODE=0
|
||||||
|
|||||||
5
dist/tools/cppcheck/check.sh
vendored
5
dist/tools/cppcheck/check.sh
vendored
@ -8,7 +8,10 @@
|
|||||||
# General Public License v2.1. See the file LICENSE in the top level
|
# General Public License v2.1. See the file LICENSE in the top level
|
||||||
# directory for more details.
|
# directory for more details.
|
||||||
|
|
||||||
: "${RIOTTOOLS:=${PWD}/dist/tools}"
|
: "${RIOTBASE:=$(cd $(dirname $0)/../../../; pwd)}"
|
||||||
|
cd $RIOTBASE
|
||||||
|
|
||||||
|
: "${RIOTTOOLS:=${RIOTBASE}/dist/tools}"
|
||||||
. "${RIOTTOOLS}"/ci/changed_files.sh
|
. "${RIOTTOOLS}"/ci/changed_files.sh
|
||||||
|
|
||||||
# Don't show warnings about unusedStructMembers by default
|
# Don't show warnings about unusedStructMembers by default
|
||||||
|
|||||||
5
dist/tools/externc/check.sh
vendored
5
dist/tools/externc/check.sh
vendored
@ -8,7 +8,10 @@
|
|||||||
# General Public License v2.1. See the file LICENSE in the top level
|
# General Public License v2.1. See the file LICENSE in the top level
|
||||||
# directory for more details.
|
# directory for more details.
|
||||||
|
|
||||||
: "${RIOTTOOLS:=${PWD}/dist/tools}"
|
: "${RIOTBASE:=$(cd $(dirname $0)/../../../; pwd)}"
|
||||||
|
cd $RIOTBASE
|
||||||
|
|
||||||
|
: "${RIOTTOOLS:=${RIOTBASE}/dist/tools}"
|
||||||
. "${RIOTTOOLS}"/ci/changed_files.sh
|
. "${RIOTTOOLS}"/ci/changed_files.sh
|
||||||
|
|
||||||
# prepare
|
# prepare
|
||||||
|
|||||||
5
dist/tools/flake8/check.sh
vendored
5
dist/tools/flake8/check.sh
vendored
@ -17,7 +17,10 @@ else
|
|||||||
CRESET=
|
CRESET=
|
||||||
fi
|
fi
|
||||||
|
|
||||||
: "${RIOTTOOLS:=${PWD}/dist/tools}"
|
: "${RIOTBASE:=$(cd $(dirname $0)/../../../; pwd)}"
|
||||||
|
cd $RIOTBASE
|
||||||
|
|
||||||
|
: "${RIOTTOOLS:=${RIOTBASE}/dist/tools}"
|
||||||
. "${RIOTTOOLS}"/ci/changed_files.sh
|
. "${RIOTTOOLS}"/ci/changed_files.sh
|
||||||
|
|
||||||
FILES=$(FILEREGEX='(?=*.py$|pyterm$)' changed_files)
|
FILES=$(FILEREGEX='(?=*.py$|pyterm$)' changed_files)
|
||||||
|
|||||||
5
dist/tools/headerguards/check.sh
vendored
5
dist/tools/headerguards/check.sh
vendored
@ -6,7 +6,10 @@
|
|||||||
# General Public License v2.1. See the file LICENSE in the top level
|
# General Public License v2.1. See the file LICENSE in the top level
|
||||||
# directory for more details.
|
# directory for more details.
|
||||||
|
|
||||||
: "${RIOTTOOLS:=${PWD}/dist/tools}"
|
: "${RIOTBASE:=$(cd $(dirname $0)/../../../; pwd)}"
|
||||||
|
cd $RIOTBASE
|
||||||
|
|
||||||
|
: "${RIOTTOOLS:=${RIOTBASE}/dist/tools}"
|
||||||
. "${RIOTTOOLS}"/ci/changed_files.sh
|
. "${RIOTTOOLS}"/ci/changed_files.sh
|
||||||
|
|
||||||
EXIT_CODE=0
|
EXIT_CODE=0
|
||||||
|
|||||||
5
dist/tools/licenses/check.sh
vendored
5
dist/tools/licenses/check.sh
vendored
@ -7,7 +7,10 @@
|
|||||||
# General Public License v2.1. See the file LICENSE in the top level
|
# General Public License v2.1. See the file LICENSE in the top level
|
||||||
# directory for more details.
|
# directory for more details.
|
||||||
|
|
||||||
: "${RIOTTOOLS:=${PWD}/dist/tools}"
|
: "${RIOTBASE:=$(cd $(dirname $0)/../../../; pwd)}"
|
||||||
|
cd $RIOTBASE
|
||||||
|
|
||||||
|
: "${RIOTTOOLS:=${RIOTBASE}/dist/tools}"
|
||||||
. "${RIOTTOOLS}"/ci/changed_files.sh
|
. "${RIOTTOOLS}"/ci/changed_files.sh
|
||||||
|
|
||||||
# customizable
|
# customizable
|
||||||
|
|||||||
8
dist/tools/pr_check/pr_check.sh
vendored
8
dist/tools/pr_check/pr_check.sh
vendored
@ -7,10 +7,14 @@
|
|||||||
# directory for more details.
|
# directory for more details.
|
||||||
#
|
#
|
||||||
|
|
||||||
EXIT_CODE=0
|
: "${RIOTBASE:=$(cd $(dirname $0)/../../../; pwd)}"
|
||||||
: "${RIOTTOOLS:=${PWD}/dist/tools}"
|
cd $RIOTBASE
|
||||||
|
|
||||||
|
: "${RIOTTOOLS:=${RIOTBASE}/dist/tools}"
|
||||||
. "${RIOTTOOLS}"/pr_check/check_labels.sh
|
. "${RIOTTOOLS}"/pr_check/check_labels.sh
|
||||||
|
|
||||||
|
EXIT_CODE=0
|
||||||
|
|
||||||
if tput colors &> /dev/null && [ $(tput colors) -ge 8 ]; then
|
if tput colors &> /dev/null && [ $(tput colors) -ge 8 ]; then
|
||||||
CERROR="\e[1;31m"
|
CERROR="\e[1;31m"
|
||||||
CRESET="\e[0m"
|
CRESET="\e[0m"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user