Files
boilerplate-py/scripts/lint.sh
T
daniil-berg 295c9ed6c7 Major overhaul:
- transition to `pyproject.toml` config
- include license (Apache-2.0)
- add dev tools
- add documentation config (`mkdocs` based)
- turn `README.md` into a symlink to docs `index.md`
- add convenience scripts for testing and linting
2023-03-09 12:08:59 +01:00

17 lines
418 B
Bash

#!/usr/bin/env bash
# Runs type checker and linters.
# Ensure that we return to the current working directory
# and exit the script immediately in case of an error:
trap "cd $(realpath ${PWD}); exit 1" ERR
# Change into project root directory:
cd "$(dirname $(dirname $(realpath $0)))"
echo 'Performing type checks...'
mypy
echo
echo 'Linting source and test files...'
flake8 src/ tests/
echo -e 'No issues found.'