blob: 6b864d264a928d443463b601729fe19a705756f2 [file] [log] [blame]
Mohammad Azim Khan21798102018-07-06 00:41:08 +01001#! /usr/bin/env sh
2
Mohammad Azim Khand2d01122018-07-18 17:48:37 +01003# This file is part of Mbed TLS (https://tls.mbed.org)
Mohammad Azim Khan21798102018-07-06 00:41:08 +01004#
Mohammad Azim Khand2d01122018-07-18 17:48:37 +01005# Copyright (c) 2018, Arm Limited, All Rights Reserved
Mohammad Azim Khan21798102018-07-06 00:41:08 +01006#
Mohammad Azim Khand2d01122018-07-18 17:48:37 +01007# Purpose:
Mohammad Azim Khan21798102018-07-06 00:41:08 +01008#
9# Run 'pylint' on Python files for programming errors and helps enforcing
10# PEP8 coding standards.
11
Simon Butchere30d03e2020-03-16 11:30:46 +000012# Find the installed version of Pylint. Installed as a distro package this can
13# be pylint3 and as a PEP egg, pylint. We prefer pylint over pylint3
14if type pylint >/dev/null 2>/dev/null; then
15 PYLINT=pylint
16elif type pylint3 >/dev/null 2>/dev/null; then
17 PYLINT=pylint3
18else
19 echo 'Pylint was not found.'
20 exit 1
21fi
22
23$PYLINT -j 2 scripts/*.py tests/scripts/*.py