Defining the behaviour of code formatting in openbmc-build-scripts

Andrew Jeffery andrew at aj.id.au
Wed Mar 30 12:26:12 AEDT 2022



On Wed, 30 Mar 2022, at 03:28, Patrick Williams wrote:
> On Tue, Mar 29, 2022 at 09:22:01PM +1030, Andrew Jeffery wrote:
>> On Tue, 29 Mar 2022, at 15:56, Patrick Williams wrote:
>> > There has been talk previously about making something like
>> > `.openbmc/config.json` as a further configuration file where we could
>> > enable / disable all these check.  I think it would be worthwhile as a
>> > way to eliminate many of the "search for special file X" checks we have
>> > where we simply touch an empty file, but I suspect we really shouldn't
>> > be using the "touch a magic empty file" mechanism anyhow.
>> 
>> This is related but is starting to feel a little tangential. I think we 
>> can get away without trying to switch things to a json config for now?
>
> I wasn't sure the scope of what you wanted to tackle right now so I was
> giving you the full-spectrum of my thoughts. 

Yep, that's fine, I was just trying to indicate which bits of the 
conversation I hoping to avoid focus on. However:

> We could certainly make a
> tactical solution that resolves the issue in EM, but I think we still
> have a mess on our hands w.r.t. specifying what linters and formatters
> are ran in CI.  Random dot files, deviations in formatting rules between
> languages, and undocumented combinations of testing are all artifacts of
> the mess

Can you be more concrete in your concerns here? Can we enumerate them so
we can make the call on whether to tackle them or not? Reading this my
thoughts were:

* Random dot files: Are we labeling e.g. .clang-format as "random"? Or
  specifically other things, not that? What specific files are we concerned
  about?

* Deviations from formatting rules between languages: Is this aimed at C
  vs C++? You can't really apply C++ formatting to e.g. Python, so I'm
  not sure what distinctions your making here

* Undocumented combinations of testing: Is this a comparative statement
  between support for the different build systems? Or something else?

Andrew


More information about the openbmc mailing list