This commit is contained in:
Marc Beninca 2025-02-01 01:47:12 +01:00
parent 459e85de92
commit 2c0d6050ef
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -9,7 +9,7 @@ rwx_lint() {
"shell" "shell"
local code local code
for code in "${@}"; do for code in "${@}"; do
rwx_log "${code}" rwx_log "" "${code}"
"rwx_lint_${code}" "${path}" "rwx_lint_${code}" "${path}"
done done
rwx_lint_clean "${path}" rwx_lint_clean "${path}"
@ -19,7 +19,7 @@ rwx_lint() {
rwx_lint_clean() { rwx_lint_clean() {
local path="${1}" local path="${1}"
[ -n "${path}" ] || return 1 [ -n "${path}" ] || return 1
rwx_log "py3clean" rwx_log "" "py3clean"
py3clean \ py3clean \
--verbose \ --verbose \
"${path}" "${path}"
@ -28,7 +28,7 @@ rwx_lint_clean() {
"ruff" "ruff"
local tool local tool
for tool in "${@}"; do for tool in "${@}"; do
rwx_log "${tool}" rwx_log "" "${tool}"
rwx_remove "${path}/.${tool}_cache" rwx_remove "${path}/.${tool}_cache"
done done
} }
@ -43,7 +43,7 @@ rwx_lint_python() {
"mypy" \ "mypy" \
"ruff" "ruff"
for action in "${@}"; do for action in "${@}"; do
rwx_log "${action}" rwx_log "" "${action}"
"rwx_${action}" "${path}" "rwx_${action}" "${path}"
done done
} }
@ -56,7 +56,7 @@ rwx_lint_shell() {
"shellcheck" \ "shellcheck" \
"shfmt" "shfmt"
for action in "${@}"; do for action in "${@}"; do
rwx_log "${action}" rwx_log "" "${action}"
"rwx_${action}" "${path}" "rwx_${action}" "${path}"
done done
} }
@ -70,7 +70,7 @@ rwx_lint_tasks() {
"TODO" \ "TODO" \
"FIXME" "FIXME"
for type in "${@}"; do for type in "${@}"; do
rwx_log "${type}" rwx_log "" "${type}"
grep \ grep \
--after "1" \ --after "1" \
--directories "recurse" \ --directories "recurse" \