# lint code rwx_lint() { local path="${1}" local code set \ "python" \ "shell" for code in "${@}"; do rwx_log "${code}" "rwx_lint_${code}" "${path}" done } # clean rwx_lint_clean() { local path="${1}" [ -n "${path}" ] || exit 1 local tool set \ "mypy" \ "ruff" for tool in "${@}"; do rwx_log "${tool}" rwx_remove "${path}/.${tool}_cache" done } # lint python code rwx_lint_python() { local path="${1}" local action set \ "pylint" \ "pydoclint" \ "mypy" \ "ruff" for action in "${@}"; do rwx_log "${action}" "rwx_${action}" "${path}" done } # lint shell code rwx_lint_shell() { local path="${1}" local action set \ "shellcheck" \ "shfmt" for action in "${@}"; do rwx_log "${action}" "rwx_${action}" "${path}" done } # lint code tasks rwx_lint_tasks() { local path="${1}" local type set \ "LATER" \ "TODO" \ "FIXME" for type in "${@}"; do rwx_log "${type}" grep \ --directories "recurse" \ --line-number \ " ${type}" \ "${path}" done }