mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-12 15:41:09 +00:00
Commit ae74f71a1e9d4be043162b19d23f2d44c964c771 removed the pylint unit test saying that unit tests are not needed to just run flake8 or pylint. Since pylint is useful, add it back, but this time call it directly and not embed it into a unit test. Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
20 lines
424 B
Bash
Executable File
20 lines
424 B
Bash
Executable File
#!/bin/sh
|
|
set -eu
|
|
|
|
# Copyright 2023, Canonical Ltd.
|
|
# SPDX-License-Identifier: GPL-3.0
|
|
|
|
PYTHON_SCRIPTS=$(grep -l -r '^#! */usr/bin/python3$' .)
|
|
|
|
echo "Running black..."
|
|
black --check --diff . $PYTHON_SCRIPTS
|
|
|
|
echo "Running isort..."
|
|
isort --check-only --diff .
|
|
|
|
echo "Running flake8..."
|
|
flake8 --max-line-length=99 --ignore=E203,W503 . $PYTHON_SCRIPTS
|
|
|
|
echo "Running pylint..."
|
|
pylint $(find * -name '*.py') $PYTHON_SCRIPTS
|