Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 015E5C433EF for ; Mon, 22 Nov 2021 03:48:56 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 81FC480615; Mon, 22 Nov 2021 04:48:54 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="TuI/RTTx"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DC00F82FBD; Mon, 22 Nov 2021 04:48:51 +0100 (CET) Received: from mail-il1-x134.google.com (mail-il1-x134.google.com [IPv6:2607:f8b0:4864:20::134]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id ED13980335 for ; Mon, 22 Nov 2021 04:48:47 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x134.google.com with SMTP id k1so16650666ilo.7 for ; Sun, 21 Nov 2021 19:48:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=BRYtpupnbTAwlsUPiwmC25zZYHAHaX8G9hUDVkHKFmE=; b=TuI/RTTxGxOGQ/qGuFOL28L5Tj13WqjlC2FvmlZWLPq8nc2NHDpdfW/6Y3B1H0QWtQ 69stBPlEgzwTK2snUXNd0IA1htkgrT6XeY9ADA82nfvR4PBCEOD4knaoMXP1Jnw5S/QS 7whppeUpTqWKXKyZEGl+i0L2PD9TyLPBXjy/Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=BRYtpupnbTAwlsUPiwmC25zZYHAHaX8G9hUDVkHKFmE=; b=c7Yig/hYTbQ2Zo762EPfxzDVODsda1HG4BwYOT1sgM5cmJTRbPOTvxWdpAaLxWxRQf uzaMvxZO4I9vONJVUgcU3+yxyG7HbaH+CSuvoY/9Cmohr4BXdBJ4ZzjfZukzU+wmt3km M0FepkFaUTNvAFjhF8NpEWzYMSpdKhkyUSKmhj8ZXXLVKgwixHFw1avf/q+SfEHUa0If teLozK0LfndPvchFZWd0qFNQv1cl6KiCL0fz4iWT2XNKJkEZIljjEyKUv7yhW/v9ydyQ x3wtRXhLTtM5Uwb1nzv0nlnSEz/X23FfH9y3IYVrAke0TtW/lZFKOiFKQO/JmJJlqkBN /krg== X-Gm-Message-State: AOAM533Hovxq+TxBam5o8GFYdG+d9PmvolmVS9VUl3mfHXiqXlSQaFID o3zhMYjQO4ZagXiCOS+m2aT1OzusUUm42Q== X-Google-Smtp-Source: ABdhPJxPE8ig51e3zdFW52JMoYjlI62i2bv4butFYnIXzbNc54DgPLfy89H313eEbE664hScMrcalw== X-Received: by 2002:a05:6e02:1c83:: with SMTP id w3mr17709159ill.66.1637552926007; Sun, 21 Nov 2021 19:48:46 -0800 (PST) Received: from kiwi.bld.corp.google.com (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id x18sm2007401iow.53.2021.11.21.19.48.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Nov 2021 19:48:45 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Heinrich Schuchardt , Simon Glass , Alper Nebi Yasak , Bin Meng , Daniel Schwierzeck , Kristian Amlie , =?UTF-8?q?Marek=20Beh=C3=BAn?= , Masahiro Yamada , =?UTF-8?q?Pali=20Roh=C3=A1r?= Subject: [PATCH 0/6] Add a pylint check Date: Sun, 21 Nov 2021 20:48:35 -0700 Message-Id: <20211122034841.304138-1-sjg@chromium.org> X-Mailer: git-send-email 2.34.0.rc2.393.gf8c9666880-goog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.37 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean U-Boot has about 60k lines of Python code. This is quite small relative to the total code size, but it is still important to keep the code style consistent. This series allows pylint to be run on Python files within U-Boot to detect any changes that reduce the current pylint ‘score’ of any modules. It works by comparing the current state against a base state kept in a file. The check is invoked with: make pylint This should gradually help to improve the code. The series also tidies up a few minor nits to produce better pylint output. Simon Glass (6): .gitignore: Ignore any html coverage directory dtoc: Fix up a code comment that confuses pylint patman: Update the list of modules tools: Add init files for Python tools Makefile: Add a pylint checker to the build Azure/GitLab CI: Add the pylint checker .azure-pipelines.yml | 17 +++ .gitignore | 7 ++ .gitlab-ci.yml | 12 +++ Makefile | 45 +++++++- doc/develop/index.rst | 8 ++ doc/develop/python_cq.rst | 80 ++++++++++++++ scripts/pylint.base | 211 +++++++++++++++++++++++++++++++++++++ tools/binman/__init__.py | 0 tools/buildman/__init__.py | 0 tools/dtoc/__init__.py | 0 tools/dtoc/dtb_platdata.py | 2 +- tools/patman/__init__.py | 9 +- 12 files changed, 386 insertions(+), 5 deletions(-) create mode 100644 doc/develop/python_cq.rst create mode 100644 scripts/pylint.base create mode 100644 tools/binman/__init__.py create mode 100644 tools/buildman/__init__.py create mode 100644 tools/dtoc/__init__.py -- 2.34.0.rc2.393.gf8c9666880-goog