blob: 518c423d9cb3327d32b45b61082c881ad977b697 [file] [log] [blame]
Mohammad Azim Khan21798102018-07-06 00:41:08 +01001#! /usr/bin/env sh
2
Bence Szépkúti1e148272020-08-07 13:07:28 +02003# Copyright The Mbed TLS Contributors
Bence Szépkútic7da1fe2020-05-26 01:54:15 +02004# 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#
Mohammad Azim Khand2d01122018-07-18 17:48:37 +010018# Purpose:
Mohammad Azim Khan21798102018-07-06 00:41:08 +010019#
20# Run 'pylint' on Python files for programming errors and helps enforcing
21# PEP8 coding standards.
22
Gilles Peskine56e99d62020-03-24 15:07:57 +010023if type python3 >/dev/null 2>/dev/null; then
24 PYTHON=python3
Simon Butchere30d03e2020-03-16 11:30:46 +000025else
Gilles Peskine56e99d62020-03-24 15:07:57 +010026 PYTHON=python
Simon Butchere30d03e2020-03-16 11:30:46 +000027fi
28
Gilles Peskine56e99d62020-03-24 15:07:57 +010029$PYTHON -m pylint -j 2 scripts/*.py tests/scripts/*.py