Re: [libvirt PATCH] tools: explain that '^' means 'Ctrl' for console escape sequence

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

 



On Fri, 2020-03-27 at 16:52 +0100, Michal Prívozník wrote:
> On 27. 3. 2020 16:42, Daniel P. Berrangé wrote:
> > > > +    if (priv->escapeChar[0] == '^') {
> > > > +        vshPrintExtra(ctl, " (Ctrl + %c)", priv->escapeChar[1]);
> > > > +    }
> > 
> > I'll remove the {} to keep syntax-check happy about single line "if"
> 
> Speaking of which. That exception, while it might have served the
> purpose in the past, now that the code base has grown in size I think
> the less exceptions to formatting style we have the better. So maybe we
> can start thinking about requiring braces for every if() ? Just a friday
> evening thought.

I'm all for it.

We should really just figure out a clang-format configuration that
approximates reasonably well our current code style, throw out
every exception that can't be represented, and just tell people to
run the tool before submitting code.

Incidentally, that's the approach both Rust and Go have followed
since the very beginning.

-- 
Andrea Bolognani / Red Hat / Virtualization





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux