From: Patrick Williams <patrick@stwcx.xyz>
To: OpenBMC List <openbmc@lists.ozlabs.org>
Subject: Additional linting in meta-layer repotest
Date: Wed, 27 Oct 2021 10:01:04 -0500 [thread overview]
Message-ID: <YXlpsDxZGsbvgHpQ@heinlein> (raw)
[-- Attachment #1: Type: text/plain, Size: 1613 bytes --]
Hello,
Ed recently added a test-phase called 'repotest'[1,2] in the openbmc/openbmc
repository that allows us to perform sanity checking on commits at that level
beyond a simple "does this compile". The initial checking he added was to
ensure that no new patches are added to the tree (in violation of our meta-layer
coding guidelines).
I'm adding[3] additional capabilities to this script to enable linting in the
repository. This will run `shellcheck` for shell scripts and `eslint` for JSON
(Some might be unaware that Manoj added JSON linting with `eslint` as part of
our normal unit-test / formatting scripts[4] as well). Once this is in place
new commits will fail CI if they add new shellscripts that violate `shellcheck`
rules or JSON with invalid parsing.
Currently, there is quite an extensive list of 'exempted' scripts (~100) which
already fail `shellcheck` rules. It is quite likely that some of these are
real bugs, so I would strongly urge if you are the maintainer of one of the
meta-layers holding an 'exempted' script that you look over the `shellcheck`
failures. Hopefully over the next few months we will greatly reduce the number
of scripts in this exemption list by cleaning up the issues.
1. https://lore.kernel.org/openbmc/CAH2-KxDe6hR1V-Lz1k8cdD11jEquy4UhR4LfLhg37E5EG42EJg@mail.gmail.com/
2. https://github.com/openbmc/openbmc/blob/master/meta-phosphor/scripts/run-repotest
3. https://gerrit.openbmc-project.xyz/c/openbmc/openbmc/+/48349
4. https://github.com/openbmc/openbmc-build-scripts/blob/master/scripts/format-code.sh#L31
--
Patrick Williams
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next reply other threads:[~2021-10-27 15:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-27 15:01 Patrick Williams [this message]
2021-11-03 23:10 ` Additional linting in meta-layer repotest Patrick Williams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YXlpsDxZGsbvgHpQ@heinlein \
--to=patrick@stwcx.xyz \
--cc=openbmc@lists.ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.