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 | # Copyright (c) 2018, Arm Limited, All Rights Reserved |
Bence Szépkúti | 51b41d5 | 2020-05-26 01:54:15 +0200 | [diff] [blame^] | 4 | # SPDX-License-Identifier: Apache-2.0 |
| 5 | # |
| 6 | # Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 7 | # not use this file except in compliance with the License. |
| 8 | # You may obtain a copy of the License at |
| 9 | # |
| 10 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | # |
| 12 | # Unless required by applicable law or agreed to in writing, software |
| 13 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 14 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | # See the License for the specific language governing permissions and |
| 16 | # limitations under the License. |
| 17 | # |
| 18 | # This file is part of Mbed TLS (https://tls.mbed.org) |
Mohammad Azim Khan | 2179810 | 2018-07-06 00:41:08 +0100 | [diff] [blame] | 19 | # |
Mohammad Azim Khan | d2d0112 | 2018-07-18 17:48:37 +0100 | [diff] [blame] | 20 | # Purpose: |
Mohammad Azim Khan | 2179810 | 2018-07-06 00:41:08 +0100 | [diff] [blame] | 21 | # |
| 22 | # Run 'pylint' on Python files for programming errors and helps enforcing |
| 23 | # PEP8 coding standards. |
| 24 | |
Gilles Peskine | c373000 | 2020-03-24 15:07:57 +0100 | [diff] [blame] | 25 | if type python3 >/dev/null 2>/dev/null; then |
| 26 | PYTHON=python3 |
Simon Butcher | 47f7287 | 2020-03-16 11:30:46 +0000 | [diff] [blame] | 27 | else |
Gilles Peskine | c373000 | 2020-03-24 15:07:57 +0100 | [diff] [blame] | 28 | PYTHON=python |
Simon Butcher | 47f7287 | 2020-03-16 11:30:46 +0000 | [diff] [blame] | 29 | fi |
| 30 | |
Gilles Peskine | c373000 | 2020-03-24 15:07:57 +0100 | [diff] [blame] | 31 | $PYTHON -m pylint -j 2 scripts/*.py tests/scripts/*.py |