mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-11 05:25:32 +03: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
Notes:
sideshowbarker
2024-07-19 06:00:07 +09:00
Author: https://github.com/emanuele6 Commit: https://github.com/SerenityOS/serenity/commit/d963be795d0 Pull-request: https://github.com/SerenityOS/serenity/pull/2432
@ -6,19 +6,19 @@ cd "$script_path/.."
|
||||
|
||||
ERRORS=()
|
||||
|
||||
for f in $(find . -path ./Root -prune -o \
|
||||
-path ./Ports -prune -o \
|
||||
-path ./.git -prune -o \
|
||||
-path ./Toolchain -prune -o \
|
||||
-type f | sort -u); do
|
||||
while IFS= read -r f; do
|
||||
if file "$f" | grep --quiet shell; then
|
||||
{
|
||||
shellcheck "$f" && echo -e "[\033[0;32mOK\033[0m]: sucessfully linted $f"
|
||||
} || {
|
||||
ERRORS+=("$f")
|
||||
}
|
||||
fi
|
||||
done
|
||||
fi
|
||||
done < <(git ls-files -- \
|
||||
'*.sh' \
|
||||
':!:Toolchain' \
|
||||
':!:Ports' \
|
||||
)
|
||||
|
||||
if (( ${#ERRORS[@]} )); then
|
||||
echo "Files failing shellcheck: ${ERRORS[*]}"
|
||||
|
Loading…
Reference in New Issue
Block a user