blob: 26366c647b905e04e4ce6437f987926caae8e950 [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# Copyright (c) 2018, Arm Limited, All Rights Reserved
Bence Szépkútif744bd72020-06-05 13:02:18 +02004# SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
5#
6# This file is provided under the Apache License 2.0, or the
7# GNU General Public License v2.0 or later.
8#
9# **********
10# Apache License 2.0:
Bence Szépkúti51b41d52020-05-26 01:54:15 +020011#
12# Licensed under the Apache License, Version 2.0 (the "License"); you may
13# not use this file except in compliance with the License.
14# You may obtain a copy of the License at
15#
16# http://www.apache.org/licenses/LICENSE-2.0
17#
18# Unless required by applicable law or agreed to in writing, software
19# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
20# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21# See the License for the specific language governing permissions and
22# limitations under the License.
23#
Bence Szépkútif744bd72020-06-05 13:02:18 +020024# **********
25#
26# **********
27# GNU General Public License v2.0 or later:
28#
29# This program is free software; you can redistribute it and/or modify
30# it under the terms of the GNU General Public License as published by
31# the Free Software Foundation; either version 2 of the License, or
32# (at your option) any later version.
33#
34# This program is distributed in the hope that it will be useful,
35# but WITHOUT ANY WARRANTY; without even the implied warranty of
36# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
37# GNU General Public License for more details.
38#
39# You should have received a copy of the GNU General Public License along
40# with this program; if not, write to the Free Software Foundation, Inc.,
41# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
42#
43# **********
44#
Bence Szépkúti51b41d52020-05-26 01:54:15 +020045# This file is part of Mbed TLS (https://tls.mbed.org)
Mohammad Azim Khan21798102018-07-06 00:41:08 +010046#
Mohammad Azim Khand2d01122018-07-18 17:48:37 +010047# Purpose:
Mohammad Azim Khan21798102018-07-06 00:41:08 +010048#
49# Run 'pylint' on Python files for programming errors and helps enforcing
50# PEP8 coding standards.
51
Gilles Peskinec3730002020-03-24 15:07:57 +010052if type python3 >/dev/null 2>/dev/null; then
53 PYTHON=python3
Simon Butcher47f72872020-03-16 11:30:46 +000054else
Gilles Peskinec3730002020-03-24 15:07:57 +010055 PYTHON=python
Simon Butcher47f72872020-03-16 11:30:46 +000056fi
57
Gilles Peskinec3730002020-03-24 15:07:57 +010058$PYTHON -m pylint -j 2 scripts/*.py tests/scripts/*.py