comicfn2dict/bin/lint-backend.sh
AJ Slater 2a59ec4cbd
v0.2.1 (#7)
* update deps. bump version

* fix news

* update deps. update ruff. lint

* Support Python 3.9 (#6)

* lint

* update deps tests work against python 3.9

* bump version and news

---------

Co-authored-by: Timmy Welch <timmy@narnian.us>
2024-03-04 12:36:39 -08:00

40 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
# Lint checks
set -euxo pipefail
####################
###### Python ######
####################
poetry run ruff check .
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 .