openbmc.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Additional linting in meta-layer repotest
@ 2021-10-27 15:01 Patrick Williams
  2021-11-03 23:10 ` Patrick Williams
  0 siblings, 1 reply; 2+ messages in thread
From: Patrick Williams @ 2021-10-27 15:01 UTC (permalink / raw)
  To: OpenBMC List

[-- 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 --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Additional linting in meta-layer repotest
  2021-10-27 15:01 Additional linting in meta-layer repotest Patrick Williams
@ 2021-11-03 23:10 ` Patrick Williams
  0 siblings, 0 replies; 2+ messages in thread
From: Patrick Williams @ 2021-11-03 23:10 UTC (permalink / raw)
  To: OpenBMC List

[-- Attachment #1: Type: text/plain, Size: 1784 bytes --]

On Wed, Oct 27, 2021 at 10:01:04AM -0500, Patrick Williams wrote:
> 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

This is now merged.

-- 
Patrick Williams

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-11-03 23:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-27 15:01 Additional linting in meta-layer repotest Patrick Williams
2021-11-03 23:10 ` Patrick Williams

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).