Commit cbe79fdf authored by Kevin Daudt's avatar Kevin Daudt

overlay: add script to run linting on packages

parent 0c03fe49
Pipeline #151 passed with stage
in 20 seconds
......@@ -6,3 +6,5 @@ RUN apk add --no-cache abuild atools spdx-licenses-list shellcheck git \
COPY overlay/ /
USER lint
CMD changed-aports master | lint
#!/bin/sh
BLUE="\e[34m"
MAGENTA="\e[35m"
RESET="\e[0m"
has_problems=0
while read PKG; do
printf "$BLUE==>$RESET Linting $PKG\n"
(
cd "$PKG"
repo=$(basename $(dirname $PKG));
if [ "$repo" = "main" ]; then
export SKIP_AL1=1
export SKIP_AL13=1
fi
printf "\n\n"
printf "$BLUE"
printf '======================================================\n'
printf " abuild sanitycheck:\n"
printf '======================================================'
printf "$RESET\n\n"
abuild sanitycheck || has_problems=1
printf "\n\n"
printf "$BLUE"
printf '======================================================\n'
printf " apkbuild-shellcheck:\n"
printf '======================================================'
printf "$RESET\n"
apkbuild-shellcheck || has_problems=1
printf "\n\n"
printf "$BLUE"
printf '======================================================\n'
printf " apkbuild-lint:\n"
printf '======================================================'
printf "$RESET\n\n"
apkbuild-lint APKBUILD || has_problems=1
return $has_problems
) || has_problems=1
echo
done
exit $has_problems
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment