rwx/sh/lint/ruff.sh

29 lines
387 B
Bash
Raw Normal View History

rwx_ruff() {
local path="${1}"
local action
set \
"check" \
"format"
for action in "${@}"; do
"rwx_ruff_${action}" "${path}"
done
}
rwx_ruff_check() {
local path="${1}"
ruff check \
--ignore "D203,D213" \
--isolated \
--select "ALL" \
"${path}"
}
rwx_ruff_format() {
local path="${1}"
ruff format \
--diff \
--isolated \
--line-length "80" \
"${path}"
}