From mboxrd@z Thu Jan 1 00:00:00 1970 From: Iurii Artemenko Subject: Re: Xen checkpatch infrastructure design Date: Wed, 26 Jul 2017 15:36:32 +0000 Message-ID: References: <54494f60-c3c3-1d13-28b7-03da33077376@suse.com> <4AD26A8C-DCDA-4BDF-8086-02F7ED4769CC@gmail.com> , <2ba41f17-3264-f414-898f-96b66646faeb@suse.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8657090175585411748==" Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1daOMX-00049P-6q for xen-devel@lists.xenproject.org; Wed, 26 Jul 2017 15:36:37 +0000 In-Reply-To: <2ba41f17-3264-f414-898f-96b66646faeb@suse.com> Content-Language: en-US List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: Juergen Gross Cc: Lars Kurth , Wei Liu , Lars Kurth , Andrew Cooper , Ian Jackson , Andrii Anisov , 'Jan Beulich' , xen-devel , cardoe List-Id: xen-devel@lists.xenproject.org --===============8657090175585411748== Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_DB6PR03MB3000B04D71F08AAEFCE19F54FDB90DB6PR03MB3000eurp_" --_000_DB6PR03MB3000B04D71F08AAEFCE19F54FDB90DB6PR03MB3000eurp_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello, Juergen > How does this work for a patch which is perfectly fine, while not > touched parts of the patched file are not? The tool should only > look at the added lines, not at those left unmodified. The tool looks at touched lines only since it works with unified diff and p= arse it. As for other files it could be done with additional parameter "/path" and f= ormat all containing files according to STYLES file. > How would it work for two files located in the same directory but of > different coding styles, both touched by the same patch? I suppose it should be mentioned in STYLES file like: xen ./xen linux ./xen/common/radix-tree.c libxl ./xen/common/other-file.c After diff is parsed we got a list of touched files so, just check for styl= e to apply. Regards Iurii --_000_DB6PR03MB3000B04D71F08AAEFCE19F54FDB90DB6PR03MB3000eurp_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

Hello, Juergen


> How does this work for a patch which is perfectly f= ine, while not
> touched parts of the patched file are not? The tool= should only
> look at the added lines, not at those left unmodifi= ed.

The tool looks at touched lines only since it works with unified diff and p= arse it.
As for other files it could be done with additional parameter "/path&q= uot; and format all containing files
according to STYLES file.

> How would it work for two files located in the same= directory but of
> different coding styles, both touched by the same p= atch?

I suppose it should be mentioned in STYLES file like:
 xen   ./xen=0A=
 linux ./xen/common/radix-tree.c
 libxl ./xen/common/other-file.c

After diff is parsed we got a list of touched files so, just check for= style to apply.

Regards
Iurii
--_000_DB6PR03MB3000B04D71F08AAEFCE19F54FDB90DB6PR03MB3000eurp_-- --===============8657090175585411748== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwczovL2xpc3RzLnhlbi5v cmcveGVuLWRldmVsCg== --===============8657090175585411748==--