marshmallow-generic/scripts/lint.sh

18 lines
382 B
Bash
Raw Normal View History

2023-03-09 12:14:37 +01:00
#!/usr/bin/env bash
# Runs various linters.
2023-03-09 12:14:37 +01:00
source "$(dirname $(realpath $0))/util.sh"
2023-03-09 12:14:37 +01:00
echo 'Linting source and test files...'
echo ' isort - consistent imports'
isort src/ tests/ --check-only
echo ' ruff - extensive linting'
ruff src/ tests/
echo ' black - consistent style'
run_and_capture black src/ tests/ --check
echo -e "${bold_green}No issues found${color_reset}\n"