All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stewart Smith <stewart@linux.vnet.ibm.com>
To: Andrew Geissler <geissonator@gmail.com>,
	ed.tanous@intel.com, Adriana Kobylak <anoo@linux.vnet.ibm.com>,
	OpenBMC Maillist <openbmc@lists.ozlabs.org>
Subject: Re: openbmc coding standards validation in CI
Date: Mon, 15 Jan 2018 12:06:29 +1100	[thread overview]
Message-ID: <87r2qs3p7u.fsf@linux.vnet.ibm.com> (raw)
In-Reply-To: <CALLMt=oxScYiG4J-Ms367nqtv_cdZURoiCsa2jz9LH6=n2fRVA@mail.gmail.com>

Andrew Geissler <geissonator@gmail.com> writes:
> During the hackathon meetup, we decided to try and get something in
> our CI jobs that would validate the code formatting and automatically
> -1 the gerrit commit if it's not up to par.  The reasoning behind this
> is we still have a lot of code review comments coming in this area,
> which is wasteful for the reviewers.
>
> Ed, Adriana, and I all worked different pieces of it.  We're using the
> clang-format tool to format (and then validate the format).  The idea
> is you do the initial run of the tool against your repo and check the
> .clang-format file in with your changes.  The presence of the file
> will cause the CI job to validate the code formatting.  After the
> .clang-format is merged, CI jobs will fail if the new code doesn't
> follow the standard.  The CI jenkins job will output the diff of the
> code that is not conforming to the console.
>
> We've tried our best to get the .clang-format file to match up with
> our requirements in
> https://github.com/openbmc/docs/blob/master/cpp-style-and-conventions.md.
>
> The .clang-format file and the changes it did to the sdbusplus repo
> can be found in https://gerrit.openbmc-project.xyz/#/c/8461/.  Review
> comments appreciated.

Oh neat!

I gather the CI job is something like "parallel clang-format -i {} :::
`find . -name '*.c' -name '*.cpp' -name '*.h'`" and then check for any
changes?

-- 
Stewart Smith
OPAL Architect, IBM.

  reply	other threads:[~2018-01-15  1:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-12 17:04 openbmc coding standards validation in CI Andrew Geissler
2018-01-15  1:06 ` Stewart Smith [this message]
2018-01-15  2:28   ` Andrew Geissler

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=87r2qs3p7u.fsf@linux.vnet.ibm.com \
    --to=stewart@linux.vnet.ibm.com \
    --cc=anoo@linux.vnet.ibm.com \
    --cc=ed.tanous@intel.com \
    --cc=geissonator@gmail.com \
    --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.