lint: Ban 2-space indentation in our CSS.

Probably most properly we should check for any number of spaces that
isn't 4, but that's a bit more work to do with our linter framework,
and in practice basically every CSS whitespace error we see is 2-space.
This commit is contained in:
Tim Abbott 2016-09-27 18:06:44 -07:00
parent 855c306c01
commit aaa221233a
4 changed files with 12 additions and 7 deletions

View File

@ -311,6 +311,11 @@ def build_custom_checkers(by_lang):
'description': "Missing whitespace after : in CSS"}, 'description': "Missing whitespace after : in CSS"},
{'pattern': '[a-z]{', {'pattern': '[a-z]{',
'description': "Missing whitespace before '{' in CSS."}, 'description': "Missing whitespace before '{' in CSS."},
{'pattern': '^[ ][ ][a-zA-Z0-9]',
'description': "Incorrect 2-space indentation in CSS",
'exclude': set(['static/styles/thirdparty-fonts.css']),
'strip': '\n',
},
{'pattern': '{\w', {'pattern': '{\w',
'description': "Missing whitespace after '{' in CSS (should be newline)."}, 'description': "Missing whitespace after '{' in CSS (should be newline)."},
] + whitespace_rules # type: RuleList ] + whitespace_rules # type: RuleList