Skip to content

Commit 3d929e5

Browse files
committed
Support isystem flag
In addition to `-I`, this adds support for the [`-isystem` flag][-isystem flag]. The main difference between `-I` and `-isystem` is that warnings for the latter will be suppressed. This is useful when using strict warnings for linting, whilst avoiding warnings from third party headers to show up. [-isystem flag]: https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-isystem-directory
1 parent 1d21f0d commit 3d929e5

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ Additional settings for SublimeLinter-clang:
5151
|Setting|Description|
5252
|:------|:----------|
5353
|I|A list of directories to be added to the header search paths.|
54+
|isystem|A list of directories to be added to the system header search paths.|
5455
|x|Automatically set depending on the file type.|
5556

5657
SublimeLinter allows [expansion variables](http://sublimelinter.readthedocs.io/en/latest/settings.html#settings-expansion). For example, '${folder}' can be used to specify a path relative to the project folder.

linter.py

+2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ class Clang(Linter):
3232
'selector': 'source.c',
3333
'args': '-Wall -fsyntax-only -fno-caret-diagnostics',
3434
'-I +': [],
35+
'-isystem +': [],
3536
'-x': 'c'
3637
}
3738
regex = OUTPUT_RE
@@ -46,6 +47,7 @@ class ClangPlus(Linter):
4647
'selector': 'source.c++',
4748
'args': '-Wall -fsyntax-only -fno-caret-diagnostics',
4849
'-I +': [],
50+
'-isystem +': [],
4951
'-x': 'c++'
5052
}
5153
regex = OUTPUT_RE

0 commit comments

Comments
 (0)