77import com .intellij .execution .configurations .GeneralCommandLine ;
88import com .intellij .execution .process .CapturingProcessHandler ;
99import com .intellij .execution .process .ProcessOutput ;
10- import com .intellij .notification .Notification ;
1110import com .intellij .notification .NotificationType ;
12- import com .intellij .notification .Notifications ;
1311import com .intellij .openapi .editor .Document ;
1412import com .intellij .openapi .progress .EmptyProgressIndicator ;
1513import com .intellij .openapi .progress .ProcessCanceledException ;
@@ -69,10 +67,9 @@ public static List<ProblemDescriptor> parseOutput(@NotNull final PsiFile psiFile
6967
7068 if (VERBOSE_LOG ) {
7169 // TODO: provide XML output via a "Show Cppcheck output" action - event log messages are truncated
72- Notifications .Bus .notify (new Notification ("Cppcheck" ,
73- "Cppcheck execution output for " + psiFile .getName (),
70+ CppcheckNotification .send ("execution output for " + psiFile .getVirtualFile ().getCanonicalPath (),
7471 cppcheckOutput ,
75- NotificationType .INFORMATION )) ;
72+ NotificationType .INFORMATION );
7673 }
7774
7875 final List <ProblemDescriptor > descriptors = new ArrayList <>();
@@ -119,6 +116,16 @@ public static List<ProblemDescriptor> parseOutput(@NotNull final PsiFile psiFile
119116 continue ;
120117 }
121118
119+ // suppress this warnings for now - will be properly handled in an upcoming patch
120+ if (id .equals ("noValidConfiguration" ) || id .equals ("missingInclude" )) {
121+ continue ;
122+ }
123+
124+ // we are never interested in these
125+ if (id .equals ("unmatchedSuppression" ) || id .equals ("purgedConfiguration" )) {
126+ continue ;
127+ }
128+
122129 // suppress this warning for headers until Cppcheck handles them in a better way
123130 if (SupportedExtensions .isHeaderFile (psiFile .getVirtualFile ()) && id .equals ("unusedStructMember" )) {
124131 continue ;
@@ -143,6 +150,9 @@ public static List<ProblemDescriptor> parseOutput(@NotNull final PsiFile psiFile
143150
144151 // ignore entries without location e.g. missingIncludeSystem
145152 if (location == null ) {
153+ CppcheckNotification .send ("no location for " + psiFile .getVirtualFile ().getCanonicalPath (),
154+ id + " " + severity + " " + inconclusive + " " + errorMessage ,
155+ NotificationType .ERROR );
146156 continue ;
147157 }
148158
@@ -160,10 +170,9 @@ public static List<ProblemDescriptor> parseOutput(@NotNull final PsiFile psiFile
160170
161171 // Cppcheck error
162172 if (lineNumber <= 0 || lineNumber > document .getLineCount ()) {
163- Notifications .Bus .notify (new Notification ("Cppcheck" ,
164- "Cppcheck line number out-of-bounds " + i ,
173+ CppcheckNotification .send ("line number out-of-bounds for " + psiFile .getVirtualFile ().getCanonicalPath (),
165174 id + " " + severity + " " + inconclusive + " " + errorMessage + " " + fileName + " " + lineNumber + " " + column ,
166- NotificationType .ERROR )) ;
175+ NotificationType .ERROR );
167176 continue ;
168177 }
169178
0 commit comments