File: run-linters

package info (click to toggle)
ubuntu-dev-tools 0.206
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 1,172 kB
  • sloc: python: 9,120; sh: 1,304; perl: 135; makefile: 10
file content (19 lines) | stat: -rwxr-xr-x 424 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/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