Skip to content

Commit 2fec3b6

Browse files
committed
README.md: re-wrote "Known Issues" section
1 parent f2acdb5 commit 2fec3b6

File tree

2 files changed

+73
-9
lines changed

2 files changed

+73
-9
lines changed

README.md

Lines changed: 72 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,86 @@ See
4040

4141
The plugin provides the `Show Cppcheck XML Output` action which will show the raw XML output of the latest finished analysis.
4242

43-
## Known Issues
43+
## Known Issues/Limitations
44+
45+
See https://github.com/johnthagen/clion-cppcheck/issues for a complete list of tracked issues and enhancements requests.
46+
47+
### Analyzing header files
4448

4549
`cppcheck` is not designed to be run on header files (`.h`) directly, as must be done for this
4650
plugin, and as a result may have false positives.
4751

4852
When run on header files directly, `cppcheck` defaults to C as the language, which will generate
49-
false positives for C++ projects. C++ projects should append `--language=c++` to the
50-
`cppcheck` options.
53+
false positives for C++ projects. So `--language=c++` is implicitly added as option when analyzing header files.
54+
55+
It will also provide `unusedFunction` and `unusedStructMember` false positives so these findings are being suppressed.
56+
57+
Related issues:<br/>
58+
https://github.com/johnthagen/clion-cppcheck/issues/22
59+
https://github.com/johnthagen/clion-cppcheck/issues/52
60+
61+
### Analyzing multiple configurations
62+
63+
By default `cppcheck` tries to determine all the available configurations for a file (i.e. all combination of the used
64+
preprocessor defines). As the plugin doesn't get the current list of defines this may lead to findings shown in code
65+
which is shown as disabled in the editor. To check just a specific configuration you can either add defines using `-D`
66+
to the options. Or you can limit the configurations to a single one adding `--max-configs=1`.
67+
68+
By default Limiting the configurations also decreases the time of the analysis.
69+
70+
By default a maximum of 12 configurations is checked. This may lead to some code which might actually be active not to
71+
show any findings. This can also be controlled by the `--max-configs=<n>` option.
72+
73+
Related issues:<br/>
74+
https://github.com/johnthagen/clion-cppcheck/issues/34
75+
https://github.com/johnthagen/clion-cppcheck/issues/52
76+
77+
### Multiple include paths
78+
79+
No additional includes path are being passed to `cppcheck` for the analysis which might result in false positives or not
80+
all findings being shown.
81+
82+
You can add additional include path using the `-I <path>` options.
83+
84+
Related issues:<br/>
85+
https://github.com/johnthagen/clion-cppcheck/issues/52
86+
https://github.com/johnthagen/clion-cppcheck/issues/55
5187

52-
`Show Cppcheck XML Output` only shows the XML result of the latest analysis. If you need to view the results for a
88+
### Batch analysis
89+
90+
The batch analysis passes the files individually to `cppcheck` just like the highlighting inspections. So if you pass a
91+
folder to the batch analysis it might not show the same findings as when passing a folder to `cppcheck` itself.
92+
93+
It will also pass all the contents of the folder to the analysis and not just project files. This might lead to
94+
unexpected findings.
95+
96+
Also some findings in headers files triggered by the analysis of a source files are not being shown.
97+
98+
Related issues:<br/>
99+
https://github.com/johnthagen/clion-cppcheck/issues/54
100+
101+
### Showing raw output
102+
103+
`Show Cppcheck XML Output` only shows the XML result of the latest analysis. If you need to view the results for a
53104
specific file make sure it was the last one analyzed.
54105

106+
Related issues:<br/>
107+
https://github.com/johnthagen/clion-cppcheck/issues/53
108+
109+
### External libraries / System includes
110+
111+
`cppcheck` does not support analyzing of external library or system includes. It provides profiles for several external
112+
libraries which describe the contents and behavior of the includes which allows it to finding issues with usage of them
113+
in the code. To add such a profile to your analysis you need to specify it via the `--library=<name>` option. The
114+
available profile can be found in the `cfg` folder of your `cppcheck` installation.
115+
116+
### Global options
117+
118+
Currently the configured options are global and not per project.
119+
120+
Related issues:<br/>
121+
https://github.com/johnthagen/clion-cppcheck/issues/52
122+
55123
## Development
56124

57125
To run the plugin from source, open this project in IntelliJ and create a new "Plugin" run configuration. Running or

resources/META-INF/plugin.xml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,7 @@
5252
<br/>
5353
5454
<b>Known issues:</b><br/>
55-
Cppcheck is not designed to be run on header files (.h) directly, as must be done for this
56-
plugin, and as a result may have false positives.<br/>
57-
When run on header files directly, Cppcheck defaults to C as the language, which will
58-
generate false positives for C++ projects. C++ projects should leave --language=c++ appended to the
59-
Cppcheck options.<br/>
55+
Please refer to <a href="https://github.com/johnthagen/clion-cppcheck#known-issues">Known Issues</a>.<br/>
6056
]]></description>
6157

6258
<change-notes><![CDATA[

0 commit comments

Comments
 (0)