Skip to content

Commit 94a0586

Browse files
committed
Update README
1 parent be2455f commit 94a0586

File tree

1 file changed

+24
-15
lines changed

1 file changed

+24
-15
lines changed

README.md

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,38 +18,47 @@ Once `clang` is installed, ensure it is in your system PATH so that SublimeLinte
1818
The docs cover [troubleshooting PATH configuration](http://sublimelinter.com/en/latest/troubleshooting.html#finding-a-linter-executable)
1919

2020
## Settings
21-
- SublimeLinter settings: http://sublimelinter.com/en/latest/settings.html
22-
- Linter settings: http://sublimelinter.com/en/latest/linter_settings.html
23-
24-
Additional settings for SublimeLinter-clang:
2521

26-
|Setting|Description|
27-
|:------|:----------|
28-
|include_dirs|A list of directories to be added to the header search paths (-I is not needed).|
29-
|extra_flags|A string with extra flags to pass to clang. These should be used carefully, as they may cause linting to fail.|
22+
We have two settings sections. 'clang' for c files, and 'clang++' to configure the linter for c++ files. E.g.
3023

31-
In project-specific settings, SublimeLinter allows [expansion variables](http://sublimelinter.readthedocs.io/en/latest/settings.html#settings-expansion). For example, in project-specific settings, '${project_path}' can be used to specify a path relative to the project folder.
3224
```
33-
"SublimeLinter":
3425
{
3526
"linters":
3627
{
3728
"clang": {
38-
"extra_flags": "-Wall -I${project_path}/foo",
39-
"include_dirs": [
40-
"${project_path}/3rdparty/bar/include",
41-
"${project_path}/3rdparty/baz"
29+
"args": "-fvery-important",
30+
"I": [
31+
"${folder}/3rdparty/bar/include",
32+
"${folder}/3rdparty/baz"
4233
]
34+
},
35+
"clang++": {
36+
"args": "-falso-important"
4337
}
4438
}
4539
},
4640
```
4741

42+
All common settings information can be found here:
43+
44+
- SublimeLinter settings: http://sublimelinter.com/en/latest/settings.html
45+
- Linter settings: http://sublimelinter.com/en/latest/linter_settings.html
46+
47+
Additional settings for SublimeLinter-clang:
48+
49+
|Setting|Description|
50+
|:------|:----------|
51+
|I|A list of directories to be added to the header search paths.|
52+
|Wall|'Wall' is set by default, set this to false to omit it|
53+
|x|Automatically set depending on the file type.|
54+
55+
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.
56+
4857
## Troubleshooting
4958
C/C++ linting is not always straightforward. A few things to try when there's (almost) no linting information available:
5059
- Try to compile from the command line, and verify it works.
5160
- The linter might be missing some header files. They can be added with "include_dirs".
5261
- Sometimes clang fails to locate the C++ standard library headers.
5362
Assuming the compilation works when executed via command line, try to compile with `clang++ -v`.
54-
This will display all of the hidden flags clang uses. As a last resort, they can all be added as "extra_flags".
63+
This will display all of the hidden flags clang uses. As a last resort, they can all be added as "args".
5564

0 commit comments

Comments
 (0)