lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: automated formatting


From: Dan Eble
Subject: Re: automated formatting
Date: Tue, 28 Jan 2020 13:28:19 -0500

On Jan 28, 2020, at 12:11, Carl Sorensen <address@hidden> wrote:
>    Can you provide me with a presubmit hook that applies fixcc? Can you
>    guarantee that, if fixcc has run on the code, there will be no further
>    remarks on code formatting during review?
> 
> I think that it's a really good idea to have presubmit hooks.  I believe, but 
> can't guarantee, that if all code were automatically reformatted on 
> submission (by either fixcc or clang-format) there would be virtually no 
> comments on formatting.  And you could completely ignore any that were made.

I'm all for making it possible for a contributor to set up something like this 
if he pleases, but I think it's a bad idea to rely on this level of automation 
and integration with a specific source-control tool.

I don't trust restyling programs to do the most desirable thing for readability 
100% of the time, and I especially don't trust them in certain situations, such 
as when I'm checking in incomplete work because of an urgent need to switch to 
another branch.

Also, our basic goal is that none of the cooks poisons the soup, i.e. merges 
badly formatted code to master.  If some of them want to experiment with wild 
mushrooms on the side, micromanaging their commits doesn't guard the soup any 
better than checking when they present their work for integration.

If you build a style check into "make check", then it will happen whenever 
contributors test their code and it will happen during the review countdown.  
If you also build a style check into the final tests before merging staging to 
master, the goal will be achieved.
— 
Dan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]