On Thu, Sep 4, 2014 at 12:18 PM, Eric Blake <ebl...@redhat.com> wrote: > Most instances of ;; in C code are mistakes, where the second > semicolon is a no-op. This rule tries to make it easy to flag > the typos occuring at the end of a statement. It intentionally > does not flag for(;;) loops, and misses grammar problems in > comments if the problem occurs in the middle of the line. > > Shell files (including configure.ac and Makefile.am, which can > contain shell snippets) are too likely to use case statements > where ;; is legitimate, so those are not scanned. > > * top/maint.mk (sc_prohibit_double_semicolon): New rule. ... > +# Except for shell files and for loops, double semicolon is probably a > mistake > +sc_prohibit_double_semicolon: > + @prohibit='; *;[ {} \]*(/[/*]|$$)' \ > + in_vc_files='\.[chly]$$' \ > + exclude='for *\(.*\)' \ > + halt="Double semicolon detected" \ > + $(_sc_search_regexp)
Looks good to me. Thanks.