Mercurial > public > mercurial-scm > hg-stable
comparison contrib/check-code.py @ 34799:0b46352384a0
contrib: remove check-code rule about indentation
We're moving towards a clang-format world, and clang-format is able to
wrap argument lists with spaces reliably, while still enforcing tabs
globally. Let's let clang-format do its job, and not do as much
C-style enforcement with regular expressions.
Differential Revision: https://phab.mercurial-scm.org/D1130
author | Augie Fackler <augie@google.com> |
---|---|
date | Mon, 16 Oct 2017 11:43:41 -0400 |
parents | 4889b84b15f2 |
children | dd000a958364 |
comparison
equal
deleted
inserted
replaced
34798:e33381d95930 | 34799:0b46352384a0 |
---|---|
427 ] | 427 ] |
428 | 428 |
429 cpats = [ | 429 cpats = [ |
430 [ | 430 [ |
431 (r'//', "don't use //-style comments"), | 431 (r'//', "don't use //-style comments"), |
432 (r'^ ', "don't use spaces to indent"), | |
433 (r'\S\t', "don't use tabs except for indent"), | 432 (r'\S\t', "don't use tabs except for indent"), |
434 (r'(\S[ \t]+|^[ \t]+)\n', "trailing whitespace"), | 433 (r'(\S[ \t]+|^[ \t]+)\n', "trailing whitespace"), |
435 (r'.{81}', "line too long"), | 434 (r'.{81}', "line too long"), |
436 (r'(while|if|do|for)\(', "use space after while/if/do/for"), | 435 (r'(while|if|do|for)\(', "use space after while/if/do/for"), |
437 (r'return\(', "return is not a function"), | 436 (r'return\(', "return is not a function"), |