mirror of
https://github.com/libratbag/libratbag.git
synced 2026-11-07 15:14:38 +01:00
lint: exit early if git ls-files doesn't find anything
This commit is contained in:
@@ -7,4 +7,10 @@ fi
|
||||
|
||||
cd "$MESON_SOURCE_ROOT" || exit 101
|
||||
|
||||
black --check $(git ls-files "*.py" "*.py.in")
|
||||
files=$(git ls-files "*.py" "*.py.in")
|
||||
if [ -z "$files" ]; then
|
||||
echo "Git didn't find any files"
|
||||
exit 77
|
||||
fi
|
||||
|
||||
black --check $files
|
||||
|
||||
@@ -7,4 +7,10 @@ fi
|
||||
|
||||
cd "$MESON_SOURCE_ROOT" || exit 101
|
||||
|
||||
ruff check $(git ls-files "*.py" "*.py.in")
|
||||
files=$(git ls-files "*.py" "*.py.in")
|
||||
if [ -z "$files" ]; then
|
||||
echo "Git didn't find any files"
|
||||
exit 77
|
||||
fi
|
||||
|
||||
ruff check $files
|
||||
|
||||
@@ -7,4 +7,10 @@ fi
|
||||
|
||||
cd "$MESON_SOURCE_ROOT" || exit 101
|
||||
|
||||
black $(git ls-files "*.py" "*.py.in")
|
||||
files=$(git ls-files "*.py" "*.py.in")
|
||||
if [ -z "$files" ]; then
|
||||
echo "Git didn't find any files"
|
||||
exit 77
|
||||
fi
|
||||
|
||||
black $files
|
||||
|
||||
@@ -7,4 +7,10 @@ fi
|
||||
|
||||
cd "$MESON_SOURCE_ROOT" || exit 101
|
||||
|
||||
ruff check --fix $(git ls-files "*.py" "*.py.in")
|
||||
files=$(git ls-files "*.py" "*.py.in")
|
||||
if [ -z "$files" ]; then
|
||||
echo "Git didn't find any files"
|
||||
exit 77
|
||||
fi
|
||||
|
||||
ruff check --fix $files
|
||||
|
||||
Reference in New Issue
Block a user