Commit ed5fd537 authored by Ben Gamari's avatar Ben Gamari 🐢

linters/check-cpp: Demote #if lints to warnings

Errors trigger even for lines which the author didn't touch, which is undesired.
parent 69d5ad06
......@@ -69,11 +69,14 @@ linters = [
RegexpLinter(br'ASSERT\s+\(',
message='CPP macros should not have a space between the macro name and their argument list'),
RegexpLinter(br'#ifdef\s+',
message='`#if defined(x)` is preferred to `#ifdef x`'),
message='`#if defined(x)` is preferred to `#ifdef x`',
severity='warning'),
RegexpLinter(br'#if\s+defined\s+',
message='`#if defined(x)` is preferred to `#if defined x`'),
message='`#if defined(x)` is preferred to `#if defined x`',
severity='warning'),
RegexpLinter(br'#ifndef\s+',
message='`#if !defined(x)` is preferred to `#ifndef x`'),
message='`#if !defined(x)` is preferred to `#ifndef x`',
severity='warning'),
]
if __name__ == '__main__':
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment