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
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,6 +63,7 @@ Deployment.
63
63
- Use unique file names for temporary files used for analysis. (Contribution by @firewave)
64
64
- Properly handle `debug` messages generated by `--debug-warnings`. (Contribution by @firewave)
65
65
- Added `.cl`, `.hxx`, `.tpp` and `.txx` to list of supported file extensions - now matches the ones supported by Cppcheck internally. (Contribution by @firewave)
66
+
- 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
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -65,8 +65,9 @@
65
65
- Fixed scanning of files with whitespaces in name. (Contribution by @firewave)
66
66
- Only scan files which actually exist. (Contribution by @firewave)
67
67
- Use unique file names for temporary files used for analysis. (Contribution by @firewave)
68
-
- Properly handle "debug" messages generated by --debug-warnings. (Contribution by @firewave
69
-
- Added .cl, .hxx, .tpp and .txx to list of supported file extensions - now matches the ones supported by Cppcheck internally. (Contribution by @firewave
68
+
- Properly handle "debug" messages generated by --debug-warnings. (Contribution by @firewave)
69
+
- Added .cl, .hxx, .tpp and .txx to list of supported file extensions - now matches the ones supported by Cppcheck internally. (Contribution by @firewave)
70
+
- 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."/>
@@ -131,41 +121,76 @@ public static List<ProblemDescriptor> parseOutput(@NotNull final PsiFile psiFile
131
121
}
132
122
}
133
123
124
+
intlineNumber = 0;
125
+
intcolumn = 0;
126
+
127
+
/*
128
+
<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."/>
129
+
*/
130
+
// TODO: handle like any warning when Cppcheck provides the --check-config results with the normal analysis
131
+
if (id.equals("missingInclude")) {
132
+
// is a global warning without location information
133
+
}
134
134
// ignore entries without location e.g. missingIncludeSystem
finalintcolumn = Integer.parseInt(locationAttributes.getNamedItem("column").getNodeValue()); // TODO
152
+
// leaving it at null will report it for the whole file
153
+
TextRangerange = null;
143
154
144
-
// If a file #include's header files, Cppcheck will also run on the header files and print
145
-
// any errors. These errors don't apply to the current file and should not be drawn. They can
146
-
// be distinguished by checking the file name.
147
-
if (!fileName.equals(sourceFileName)) {
148
-
continue;
155
+
/*
156
+
<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()) {
163
+
// TODO: handle like any warning when Cppcheck provides the --check-config results with the normal analysis
164
+
elseif (id.equals("missingInclude")) {
165
+
// show as message for the file
166
+
}
167
+
/*
168
+
<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