mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 11:15:14 -07:00
clint: Reject indented preprocessor directives
This is also not allowed by the style guide: https://neovim.io/develop/style-guide.xml#Preprocessor_Directives.
This commit is contained in:
parent
739f066afe
commit
3676ad4530
@ -2508,6 +2508,11 @@ def CheckSpacing(filename, clean_lines, linenum, nesting_state, error):
|
||||
'it is preferred to use the same amount of spaces as preceding '
|
||||
'indent')
|
||||
|
||||
if Match(r'^ +#', line):
|
||||
error(filename, linenum, 'whitespace/indent', 5,
|
||||
'Must not indent preprocessor directives, use 1-space indent '
|
||||
'after the hash')
|
||||
|
||||
|
||||
def GetPreviousNonBlankLine(clean_lines, linenum):
|
||||
"""Return the most recent non-blank line and its line number.
|
||||
|
Loading…
Reference in New Issue
Block a user