mirror of
https://github.com/libratbag/libratbag.git
synced 2026-11-07 15:14:38 +01:00
tools: skip linter checks if linters are not installed
This commit is contained in:
@@ -13,4 +13,9 @@ if [ -z "$files" ]; then
|
||||
exit 77
|
||||
fi
|
||||
|
||||
command -v black >/dev/null 2>&1 || {
|
||||
echo >&2 "black is not installed"
|
||||
exit 77
|
||||
}
|
||||
|
||||
black --check $files
|
||||
|
||||
@@ -13,4 +13,9 @@ if [ -z "$files" ]; then
|
||||
exit 77
|
||||
fi
|
||||
|
||||
command -v ruff >/dev/null 2>&1 || {
|
||||
echo >&2 "ruff is not installed"
|
||||
exit 77
|
||||
}
|
||||
|
||||
ruff check $files
|
||||
|
||||
@@ -13,4 +13,9 @@ if [ -z "$files" ]; then
|
||||
exit 77
|
||||
fi
|
||||
|
||||
command -v black >/dev/null 2>&1 || {
|
||||
echo >&2 "black is not installed"
|
||||
exit 77
|
||||
}
|
||||
|
||||
black $files
|
||||
|
||||
@@ -13,4 +13,9 @@ if [ -z "$files" ]; then
|
||||
exit 77
|
||||
fi
|
||||
|
||||
command -v ruff >/dev/null 2>&1 || {
|
||||
echo >&2 "ruff is not installed"
|
||||
exit 77
|
||||
}
|
||||
|
||||
ruff check --fix $files
|
||||
|
||||
Reference in New Issue
Block a user