Mercurial > public > mercurial-scm > hg
comparison contrib/check-code.py @ 13748:26f8844d1757
osutil: replace #import with #include, and add a check for it
author | Dan Villiom Podlaski Christiansen <danchr@gmail.com> |
---|---|
date | Wed, 23 Mar 2011 23:05:32 +0100 |
parents | f3c4421e121c |
children | bb391e0515ba |
comparison
equal
deleted
inserted
replaced
13747:cede00420e1e | 13748:26f8844d1757 |
---|---|
178 (r'\S+ (\+\+|--)', "use foo++, not foo ++"), | 178 (r'\S+ (\+\+|--)', "use foo++, not foo ++"), |
179 (r'\w,\w', "missing whitespace after ,"), | 179 (r'\w,\w', "missing whitespace after ,"), |
180 (r'^[^#]\w[+/*]\w', "missing whitespace in expression"), | 180 (r'^[^#]\w[+/*]\w', "missing whitespace in expression"), |
181 (r'^#\s+\w', "use #foo, not # foo"), | 181 (r'^#\s+\w', "use #foo, not # foo"), |
182 (r'[^\n]\Z', "no trailing newline"), | 182 (r'[^\n]\Z', "no trailing newline"), |
183 (r'^\s*#import\b', "use only #include in standard C code"), | |
183 ] | 184 ] |
184 | 185 |
185 cfilters = [ | 186 cfilters = [ |
186 (r'(/\*)(((\*(?!/))|[^*])*)\*/', repccomment), | 187 (r'(/\*)(((\*(?!/))|[^*])*)\*/', repccomment), |
187 (r'''(?P<quote>(?<!")")(?P<text>([^"]|\\")+)"(?!")''', repquote), | 188 (r'''(?P<quote>(?<!")")(?P<text>([^"]|\\")+)"(?!")''', repquote), |