mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:28:10 +00:00
Meta: update lint-shell-scripts.sh so that it does not search in Build/
We now use git-ls-files(1) instead of find(1).
This commit is contained in:
parent
937d0be762
commit
d963be795d
1 changed files with 7 additions and 7 deletions
|
@ -6,19 +6,19 @@ cd "$script_path/.."
|
||||||
|
|
||||||
ERRORS=()
|
ERRORS=()
|
||||||
|
|
||||||
for f in $(find . -path ./Root -prune -o \
|
while IFS= read -r f; do
|
||||||
-path ./Ports -prune -o \
|
|
||||||
-path ./.git -prune -o \
|
|
||||||
-path ./Toolchain -prune -o \
|
|
||||||
-type f | sort -u); do
|
|
||||||
if file "$f" | grep --quiet shell; then
|
if file "$f" | grep --quiet shell; then
|
||||||
{
|
{
|
||||||
shellcheck "$f" && echo -e "[\033[0;32mOK\033[0m]: sucessfully linted $f"
|
shellcheck "$f" && echo -e "[\033[0;32mOK\033[0m]: sucessfully linted $f"
|
||||||
} || {
|
} || {
|
||||||
ERRORS+=("$f")
|
ERRORS+=("$f")
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
done
|
done < <(git ls-files -- \
|
||||||
|
'*.sh' \
|
||||||
|
':!:Toolchain' \
|
||||||
|
':!:Ports' \
|
||||||
|
)
|
||||||
|
|
||||||
if (( ${#ERRORS[@]} )); then
|
if (( ${#ERRORS[@]} )); then
|
||||||
echo "Files failing shellcheck: ${ERRORS[*]}"
|
echo "Files failing shellcheck: ${ERRORS[*]}"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue