comicfn2dict/bin/lint-backend.sh

40 lines
1.1 KiB
Bash
Raw Normal View History

2023-12-21 13:04:52 -08:00
#!/bin/bash
# Lint checks
set -euxo pipefail
####################
###### Python ######
####################
poetry run ruff check .
2023-12-21 13:04:52 -08:00
poetry run ruff format --check .
poetry run pyright
poetry run vulture .
if [ "$(uname)" = "Darwin" ]; then
# Radon is only of interest to development
poetry run radon mi --min B .
poetry run radon cc --min C .
fi
# poetry run djlint templates --profile=django --lint
############################################
##### Javascript, JSON, Markdown, YAML #####
############################################
npm run lint
npm run remark-check
################################
###### Docker, Shell, Etc ######
################################
if [ "$(uname)" = "Darwin" ]; then
# Hadolint & shfmt are difficult to install on linux
# shellcheck disable=2035
# hadolint *Dockerfile
shellharden ./**/*.sh
# subdirs aren't copied into docker builder
# .env files aren't copied into docker
shellcheck --external-sources ./**/*.sh
# circleci config validate .circleci/config.yml
fi
./bin/roman.sh -i .prettierignore .
poetry run codespell .