Mohammad Azim Khan | 2179810 | 2018-07-06 00:41:08 +0100 | [diff] [blame] | 1 | #! /usr/bin/env sh |
| 2 | |
Mohammad Azim Khan | d2d0112 | 2018-07-18 17:48:37 +0100 | [diff] [blame] | 3 | # This file is part of Mbed TLS (https://tls.mbed.org) |
Mohammad Azim Khan | 2179810 | 2018-07-06 00:41:08 +0100 | [diff] [blame] | 4 | # |
Mohammad Azim Khan | d2d0112 | 2018-07-18 17:48:37 +0100 | [diff] [blame] | 5 | # Copyright (c) 2018, Arm Limited, All Rights Reserved |
Mohammad Azim Khan | 2179810 | 2018-07-06 00:41:08 +0100 | [diff] [blame] | 6 | # |
Mohammad Azim Khan | d2d0112 | 2018-07-18 17:48:37 +0100 | [diff] [blame] | 7 | # Purpose: |
Mohammad Azim Khan | 2179810 | 2018-07-06 00:41:08 +0100 | [diff] [blame] | 8 | # |
| 9 | # Run 'pylint' on Python files for programming errors and helps enforcing |
| 10 | # PEP8 coding standards. |
| 11 | |
Simon Butcher | e30d03e | 2020-03-16 11:30:46 +0000 | [diff] [blame^] | 12 | # 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 |
| 14 | if type pylint >/dev/null 2>/dev/null; then |
| 15 | PYLINT=pylint |
| 16 | elif type pylint3 >/dev/null 2>/dev/null; then |
| 17 | PYLINT=pylint3 |
| 18 | else |
| 19 | echo 'Pylint was not found.' |
| 20 | exit 1 |
| 21 | fi |
| 22 | |
| 23 | $PYLINT -j 2 scripts/*.py tests/scripts/*.py |