21
21
### Initial Plugin Configuration
22
22
23
23
1 . Install the [ ` cppcheck ` ] ( http://cppcheck.sourceforge.net/ ) tool using the instructions on its homepage. This plugin
24
- does ** not** bundle the ` cppcheck ` tool itself, which must be installed separately.
24
+ does ** not** bundle the Cppcheck tool itself, which must be installed separately.
25
25
2 . Install the [ cppcheck plugin] [ cppcheck_plugin ] into CLion.
26
- 3 . Configure the plugin with the ** absolute** path to the ` cppcheck ` executable into the ` cppcheck path ` option.
26
+ 3 . Configure the plugin with the ** absolute** path to the Cppcheck executable into the ` cppcheck path ` option.
27
27
1 . Windows
28
28
1 . File | Settings | Cppcheck configuration
29
29
2 . Usually the path is ` C:\Program Files (x86)\Cppcheck\cppcheck.exe `
30
30
2 . macOS:
31
31
1 . CLion | Preferences | Cppcheck configuration
32
- 2 . In a terminal run ` which cppcheck ` to find the path to ` cppcheck ` . If you installed it with
32
+ 2 . In a terminal run ` which cppcheck ` to find the path to Cppcheck . If you installed it with
33
33
[ Homebrew] ( https://brew.sh/ ) , the path will be ` /usr/local/bin/cppcheck ` .
34
34
3 . Linux
35
35
1 . File | Settings | Cppcheck configuration
36
- 2 . In a terminal run ` which cppcheck ` to find the path to ` cppcheck ` . If you installed it with your
36
+ 2 . In a terminal run ` which cppcheck ` to find the path to Cppcheck . If you installed it with your
37
37
system's package manager, it is probably located at ` /usr/bin/cppcheck ` .
38
38
39
39
[ cppcheck_plugin ] : https://plugins.jetbrains.com/plugin/8143
@@ -50,10 +50,10 @@ See https://github.com/johnthagen/clion-cppcheck/issues for a complete list of t
50
50
51
51
### Analyzing header files
52
52
53
- ` cppcheck ` is not designed to be run on header files (` .h ` ) directly, as must be done for this
53
+ Cppcheck is not designed to be run on header files (` .h ` ) directly, as must be done for this
54
54
plugin, and as a result may have false positives.
55
55
56
- When run on header files directly, ` cppcheck ` defaults to C as the language, which will generate
56
+ When run on header files directly, Cppcheck defaults to C as the language, which will generate
57
57
false positives for C++ projects. So ` --language=c++ ` is implicitly added as option when analyzing header files.
58
58
59
59
It will also provide ` unusedFunction ` and ` unusedStructMember ` false positives so these findings are being suppressed.
@@ -64,7 +64,7 @@ https://github.com/johnthagen/clion-cppcheck/issues/52
64
64
65
65
### Analyzing multiple configurations
66
66
67
- By default ` cppcheck ` tries to determine all the available configurations for a file (i.e. all combination of the used
67
+ By default Cppcheck tries to determine all the available configurations for a file (i.e. all combination of the used
68
68
preprocessor defines). As the plugin doesn't get the current list of defines this may lead to findings shown in code
69
69
which is shown as disabled in the editor. To check just a specific configuration you can either add defines using ` -D `
70
70
to the options. Or you can limit the configurations to a single one adding ` --max-configs=1 ` .
@@ -80,7 +80,7 @@ https://github.com/johnthagen/clion-cppcheck/issues/52
80
80
81
81
### Multiple include paths
82
82
83
- No additional includes path are being passed to ` cppcheck ` for the analysis which might result in false positives or not
83
+ No additional includes path are being passed to Cppcheck for the analysis which might result in false positives or not
84
84
all findings being shown.
85
85
86
86
You can add additional include path using the ` -I <path> ` options.
@@ -91,8 +91,8 @@ https://github.com/johnthagen/clion-cppcheck/issues/55
91
91
92
92
### Batch analysis
93
93
94
- The batch analysis passes the files individually to ` cppcheck ` just like the highlighting inspections. So if you pass a
95
- folder to the batch analysis it might not show the same findings as when passing a folder to ` cppcheck ` itself.
94
+ The batch analysis passes the files individually to Cppcheck just like the highlighting inspections. So if you pass a
95
+ folder to the batch analysis it might not show the same findings as when passing a folder to ` Cppcheck ` itself.
96
96
97
97
It will also pass all the contents of the folder to the analysis and not just project files. This might lead to
98
98
unexpected findings.
@@ -112,10 +112,10 @@ https://github.com/johnthagen/clion-cppcheck/issues/53
112
112
113
113
### External libraries / System includes
114
114
115
- ` cppcheck ` does not support analyzing of external library or system includes. It provides profiles for several external
115
+ Cppcheck does not support analyzing of external library or system includes. It provides profiles for several external
116
116
libraries which describe the contents and behavior of the includes which allows it to finding issues with usage of them
117
117
in the code. To add such a profile to your analysis you need to specify it via the ` --library=<name> ` option. The
118
- available profile can be found in the ` cfg ` folder of your ` cppcheck ` installation.
118
+ available profile can be found in the ` cfg ` folder of your ` Cppcheck ` installation.
119
119
120
120
### Global options
121
121
@@ -192,7 +192,7 @@ Support Cppcheck >1.89. (Contribution by @SJ-Innovation)
192
192
193
193
### 1.2.0 - 2018-04-11
194
194
195
- Greatly improve plugin responsiveness to changes by using virtual files to interact with ` cppcheck ` .
195
+ Greatly improve plugin responsiveness to changes by using virtual files to interact with Cppcheck .
196
196
(Contribution by @fastasturtle )
197
197
198
198
### 1.1.0 - 2018-04-02
@@ -238,7 +238,7 @@ Fix execution on Linux.
238
238
239
239
### 1.0.1 - 2016-01-11
240
240
241
- Fix possible out of bounds line number when `` cppcheck `` gets out of sync with in-memory file.
241
+ Fix possible out of bounds line number when Cppcheck gets out of sync with in-memory file.
242
242
243
243
### 1.0.0 - 2016-01-07
244
244
0 commit comments