Lines Matching +full:sub +full:- +full:spaces
36 # Lack of spaces around binary operator (sometimes)
40 # Incorrect indentation as determined by emacs c-mode (if possible)
45 # Anything non-syntactic (proper cleanup flow control, naming, etc.)
46 # UTF-8 violations
48 # Inner-scope variable declarations
49 # Over- or under-parenthesization
67 if 'c-basic-offset: 4; indent-tabs-mode: nil' not in lines[0]:
71 cstyle_el = os.path.join(util_dir, 'krb5-c-style.el')
72 reindent_el = os.path.join(util_dir, 'krb5-batch-reindent.el')
76 args = ['emacs', '-q', '-batch', '-l', cstyle_el, '-l', reindent_el,
105 warn(ln, '8+ spaces in file which uses tabs')
109 if line and line[-1] in ' \t':
116 warn(ln, 'Multi-line comment begins after code')
123 if not lines[-1].rstrip().endswith('*/'):
124 warn(ln, 'Code after end of multi-line comment')
126 lines[-1].strip() != '*/'):
136 # Strip out one-line initializer expressions.
137 line = re.sub(r'=\s*{.*}', '', line)
139 warn(ln, 'Un-cuddled open brace')
181 for m in re.finditer(r'\(([^(]+)\)(\s*)[a-zA-Z_(]', line):
190 binop = r'(\+|-|\*|/|%|\^|==|=|!=|<=|<|>=|>|&&|&|\|\||\|)'
192 warn(ln - 1, 'Line broken before binary operator')
199 elif op not in ('-', '*', '&') and not after.isspace():
226 # Look at the next two lines (ln is 1-based so lines[ln] is next).
241 if ln - 1 >= len(indented_lines):
248 if line != indented_lines[ln - 1].rstrip('\r\n'):
256 allow_tabs = 'indent-tabs-mode: nil' not in lines[0]
274 # Strip out single-line comments the contents of string literals.
276 line = re.sub(r'/\*.*?\*/', '', line)
277 line = re.sub(r'"(\\.|[^"])*"', '""', line)
279 # Parse out and check multi-line comments. (Ignore code on
284 check_comment(comment, ln - len(comment) + 1)
291 line = re.sub(r'//.*/', '', line)
309 if lines[-1] == '':
320 sys.stderr.write('Usage: cstyle-file [filename]\n')