Add lint-py.sh, running the various static analysis tools we use for
Python.
Change-Id: I6ccd5f7fb484506a0f936d7fe276042cccd186a6
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/11269
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
LICENSES/MIT \
std-ext-lib.txt \
tools/format-cpp.sh \
+ tools/lint-py.sh \
version
--- /dev/null
+#!/bin/bash
+#
+# SPDX-License-Identifier: GPL-2.0-only
+#
+# Copyright (C) 2023 EfficiOS, Inc.
+
+exit_code=0
+
+set -x
+
+black --diff --check . || exit_code=1
+flake8 || exit_code=1
+isort . --diff --check || exit_code=1
+
+exit $exit_code