+1, this seems like a viable scheme to me.
We’ll need to configure the underlying indent engine so that newly-indented
code looks as much like the rest of the code as possible.
The result below wouldn’t preclude automatic cherry-picking, but it would make
everyone’s head explode, particularly if one’s favorite code editor likes to
“fix” such things:
if (a)
{
b = 13;
c = 12;
/* new code */
if(d) {
e=this_is_new();
}
/* end new code */
}
Thanks... Dave
From: Damjan Marion <[email protected]>
Sent: Saturday, April 18, 2020 5:51 AM
To: Andrew Yourtchenko <[email protected]>
Cc: Dave Barach (dbarach) <[email protected]>; Zhang Yuwei
<[email protected]>; [email protected]
Subject: Re: [vpp-dev] Checkstyle script not work in ubuntu
And this is example of script, which just formats modified lines, instead of
re-formating whole file, as we do today.
With something like this, we can introduce new indent or even move to
clang-format without the need to reformat old code….
https://github.com/llvm-mirror/clang/blob/master/tools/clang-format/clang-format-diff.py
—
Damjan
On 18 Apr 2020, at 11:00, Damjan Marion via lists.fd.io<http://lists.fd.io>
<[email protected]<mailto:[email protected]>> wrote:
If we decided to stick with old indent, which i still disagree that is right
thing to do, can you just compile indent all the time and
modify path so /opt/vpp/…/bin/ comes first. I really don’t like one more
option in the top level Makefile.
—
Damjan
On 18 Apr 2020, at 10:29, Andrew Yourtchenko
<[email protected]<mailto:[email protected]>> wrote:
I made https://gerrit.fd.io/r/#/c/vpp/+/22963/ that you can try and see how it
works for you.
It allows to install the “correct” version of indent into the build tree, so
the rest of the system is unaffected.
--a
On 11 Apr 2020, at 14:04, Dave Barach via lists.fd.io<http://lists.fd.io/>
<[email protected]<mailto:[email protected]>> wrote:
The script works fine. You have the wrong version of gnu indent installed. This
is the version you need:
$ indent --version
GNU indent 2.2.11
From: [email protected]<mailto:[email protected]>
<[email protected]<mailto:[email protected]>> On Behalf Of Zhang Yuwei
Sent: Saturday, April 11, 2020 1:04 AM
To: [email protected]<mailto:[email protected]>
Subject: [vpp-dev] Checkstyle script not work in ubuntu
Hi Guys,
I find checkstyle script doesn’t work normally in ubuntu sometimes
that I run make fixstyle in ubuntu and submit the code to gerrit but still fail
in checkstyle step. I need to move to centos to make it work, can anybody check
this? Thanks a lot.
Regards,
Yuwei
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#16103): https://lists.fd.io/g/vpp-dev/message/16103
Mute This Topic: https://lists.fd.io/mt/72939086/21656
Group Owner: [email protected]
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-