Single-Source

Patrick Venture venture at google.com
Thu Aug 30 03:01:06 AEST 2018


On Wed, Aug 29, 2018 at 9:55 AM Brad Bishop <bradleyb at fuzziesquirrel.com> wrote:
>
>
>
> > On Aug 29, 2018, at 11:53 AM, Patrick Venture <venture at google.com> wrote:
> >
> > Brad;
> >
> > While working on updating the documentation, which holds a
> > clang-format example in it, within the markdown, I was curious if
> > there was a single-source of truth w.r.t configurations of this
> > nature?  I imagine it hasn't been an issue yet, but I'm going to
> > update clang-format files to use the header inclusion, once we settle
> > on the exact pattern, and it'd be useful to have a single-source file
> > where I could make the change, and copy that file out into places --
> > since I'm not sure of a reasonable automated approach.
> >
> > Any suggestions or thoughts would be appreciated.
>
> Honestly I don’t think we should be telling maintainers how to style
> the code they maintain.  Just that they have one and and provide a way
> for contributors to adhere to it.

I'm 50/50 on that one.  I think if you have a standard against which
all the code in a project follows, it's easier to work with -- the
sort of classic answer.  If we say, maintainers can do what they want
as long as contributors can adhere to it, then what's to say they
should follow the openbmc style?  I am sure most engineers have
differences with the openbmc style, so if they all end up with their
own variations of clang-format -- at least it's automated, but it's
still different to read every repo.  Of course, the clang-format
doesn't do variables names (right?), the style guide still dictates
that... I don't know, it seems like if everything under openbmc/ has
the same style it has increased coherency.

>
> But I think I am in the minority with that viewpoint so I guess you
> could put a clang-format in the docs repo?  Does that work?

That would work for me, so I can just copy that into my repo(s).

>
>
> >
> > Patrick


More information about the openbmc mailing list