Re: [Qemu-devel] [PATCH v2] scripts: add script to convert multiline comments into 4-line format

2018-12-14 Thread Wainer dos Santos Moschetta
On 12/14/2018 04:15 PM, Paolo Bonzini wrote: On 14/12/18 19:06, Wainer dos Santos Moschetta wrote: IIUC above block handles the lines between lead and trail. So it would fix (but it doesn't) this: # cat foo /*  comment 1  comment 2  */ # scripts/fix-multiline-comments.sh foo /*  comment

Re: [Qemu-devel] [PATCH v2] scripts: add script to convert multiline comments into 4-line format

2018-12-14 Thread Paolo Bonzini
On 14/12/18 19:06, Wainer dos Santos Moschetta wrote: > > IIUC above block handles the lines between lead and trail. So it would > fix (but it doesn't) this: > > # cat foo > /* >  comment 1 >  comment 2 >  */ > > # scripts/fix-multiline-comments.sh foo > /* >  comment 1 >  comment 2 >  */ Not

Re: [Qemu-devel] [PATCH v2] scripts: add script to convert multiline comments into 4-line format

2018-12-14 Thread Wainer dos Santos Moschetta
On 12/14/2018 07:48 AM, Paolo Bonzini wrote: Since we're adding checkpatch rules to enforce 4-line multiline comment format, i.e. with lone /* and */, this script can be run on existing code so that the comment style does not become inconsistent within a file. The alternative to

[Qemu-devel] [PATCH v2] scripts: add script to convert multiline comments into 4-line format

2018-12-14 Thread Paolo Bonzini
Since we're adding checkpatch rules to enforce 4-line multiline comment format, i.e. with lone /* and */, this script can be run on existing code so that the comment style does not become inconsistent within a file. The alternative to awk-in-a-shell-script could be Perl, which also supports -i