You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1
Original file line number
Diff line number
Diff line change
@@ -70,6 +70,7 @@ Deployment.
70
70
- Added `.cl`, `.hxx`, `.tpp` and `.txx` to list of supported file extensions - now matches the ones supported by Cppcheck internally. (Contribution by @firewave)
71
71
- Internally suppress `unusedFunction` and `unusedStructMember` (for header files only) warnings to avoid false positives. (Contribution by @firewave)
72
72
- Fixed `information` messages not being shown at all. (Contribution by @firewave)
73
+
- Show some Cppcheck messages (`toomanyconfigs`, `missingInclude`, `noValidConfiguration`) on file-level. (Contribution by @firewave)
Copy file name to clipboardExpand all lines: resources/META-INF/plugin.xml
+1
Original file line number
Diff line number
Diff line change
@@ -68,6 +68,7 @@
68
68
- Added .cl, .hxx, .tpp and .txx to list of supported file extensions - now matches the ones supported by Cppcheck internally. (Contribution by @firewave)
69
69
- Internally suppress "unusedFunction" and "unusedStructMember" (for header files only) warnings to avoid false positives. (Contribution by @firewave)
70
70
- Fixed "information" messages not being shown at all. (Contribution by @firewave)
71
+
- Show some Cppcheck messages (toomanyconfigs, missingInclude, noValidConfiguration) on file-level. (Contribution by @firewave)
<error id="toomanyconfigs" severity="information" msg="Too many #ifdef configurations - cppcheck only checks 1 of 12 configurations. Use --force to check all configurations." verbose="The checking of the file will be interrupted because there are too many #ifdef configurations. Checking of all #ifdef configurations can be forced by --force command line option or from GUI preferences. However that may increase the checking time." cwe="398">
<error id="missingIncludeSystem" severity="information" msg="Cppcheck cannot find all the include files (use --check-config for details)" verbose="Cppcheck cannot find all the include files. Cppcheck can check the code without the include files found. But the results will probably be more accurate if all the include files are found. Please check your project's include directories and add all of them as include directories for Cppcheck. To see what files Cppcheck cannot find use --check-config."/>
@@ -148,43 +138,84 @@ public static List<ProblemDescriptor> parseOutput(@NotNull final PsiFile psiFile
148
138
}
149
139
}
150
140
141
+
StringfileName = null;
142
+
intlineNumber = 0;
143
+
intcolumn = 0;
144
+
145
+
/*
146
+
<error id="missingInclude" severity="information" msg="Cppcheck cannot find all the include files (use --check-config for details)" verbose="Cppcheck cannot find all the include files. Cppcheck can check the code without the include files found. But the results will probably be more accurate if all the include files are found. Please check your project's include directories and add all of them as include directories for Cppcheck. To see what files Cppcheck cannot find use --check-config."/>
147
+
*/
148
+
// TODO: handle like any warning when Cppcheck provides the --check-config results with the normal analysis
149
+
if (id.equals("missingInclude")) {
150
+
// is a global warning without location information
151
+
}
151
152
// ignore entries without location e.g. missingIncludeSystem
152
-
if (location == null) {
153
+
elseif (location == null) {
153
154
CppcheckNotification.send("no location for " + psiFile.getVirtualFile().getCanonicalPath(),
finalintcolumn = Integer.parseInt(locationAttributes.getNamedItem("column").getNodeValue()); // TODO
173
+
// leaving it at null will report it for the whole file
174
+
TextRangerange = null;
163
175
164
-
// If a file #include's header files, Cppcheck will also run on the header files and print
165
-
// any errors. These errors don't apply to the current file and should not be drawn. They can
166
-
// be distinguished by checking the file name.
167
-
if (!fileName.equals(sourceFileName)) {
168
-
continue;
176
+
/*
177
+
<error id="toomanyconfigs" severity="information" msg="Too many #ifdef configurations - cppcheck only checks 1 of 12 configurations. Use --force to check all configurations." verbose="The checking of the file will be interrupted because there are too many #ifdef configurations. Checking of all #ifdef configurations can be forced by --force command line option or from GUI preferences. However that may increase the checking time." cwe="398">
if (lineNumber <= 0 || lineNumber > document.getLineCount()) {
184
+
// TODO: handle like any warning when Cppcheck provides the --check-config results with the normal analysis
185
+
elseif (id.equals("missingInclude")) {
186
+
// show as message for the file
187
+
}
188
+
/*
189
+
<error id="noValidConfiguration" severity="information" msg="This file is not analyzed. Cppcheck failed to extract a valid configuration. Use -v for more details." verbose="This file is not analyzed. Cppcheck failed to extract a valid configuration. The tested configurations have these preprocessor errors:\012'' : [/mnt/s/GitHub/cppcheck-fw/gui/temp/moc_platforms.cpp:13] #error "The header file 'platforms.h' doesn't include <QObject>."\012Q_MOC_OUTPUT_REVISION : [/mnt/s/GitHub/cppcheck-fw/gui/temp/moc_platforms.cpp:15] #error "This file was generated using the moc from 5.12.5. It"">
0 commit comments