Re: [PATCH 3/4] lib: Fix c99 style comments

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

 



On Thu, Apr 27, 2017 at 11:09:29AM +0200, Michal Privoznik wrote:
> On 04/27/2017 10:19 AM, Daniel P. Berrange wrote:
> > On Thu, Apr 27, 2017 at 09:01:59AM +0200, Michal Privoznik wrote:
> >> We prefer c89 style of comments.
> >>
> >> Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
> >> ---
> >>  examples/openauth/openauth.c  | 2 +-
> >>  src/lxc/lxc_controller.c      | 2 +-
> >>  src/remote/remote_driver.c    | 2 +-
> >>  src/rpc/virnetservermdns.c    | 2 +-
> >>  src/security/security_stack.c | 8 ++++----
> >>  src/uml/uml_conf.c            | 2 +-
> >>  src/util/virhostcpu.c         | 4 ++--
> >>  src/util/virhostmem.c         | 4 ++--
> >>  src/vbox/vbox_snapshot_conf.c | 2 +-
> >>  tests/eventtest.c             | 2 +-
> >>  tests/virhostcpumock.c        | 2 +-
> >>  11 files changed, 16 insertions(+), 16 deletions(-)
> > 
> > How about a syntax-check rule to enforce this ?
> 
> It's going to be not trivial. Consider:
> 
> /* My awesome comment, that contains
>  * http://an.url.com
>  */
> 
> It's not easy to know that line 2 of the comment is already in comment.
> We can't just forbid all '//' strings.

Our build-aux/bracket-spacing.pl script knows how to strip out /* ... */

It also strips // out, so we could just adapt it to whine when it sees
// comments, rather than try to do it using the cfg.mk rules.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[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