tools: allow static checks to be run from any directory

This commit is contained in:
smlng 2018-06-05 17:06:11 +02:00
parent 59e18df6c8
commit 1adb5852ec
7 changed files with 30 additions and 8 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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"