Skip to content

Commit 03f4715

Browse files
committed
show full path in notifications
1 parent 89e1b14 commit 03f4715

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/com/github/johnthagen/cppcheck/CppCheckInspectionImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public static List<ProblemDescriptor> parseOutput(@NotNull final PsiFile psiFile
6767

6868
if (VERBOSE_LOG) {
6969
// TODO: provide XML output via a "Show Cppcheck output" action - event log messages are truncated
70-
CppcheckNotification.send("execution output for " + psiFile.getName(),
70+
CppcheckNotification.send("execution output for " + psiFile.getVirtualFile().getCanonicalPath(),
7171
cppcheckOutput,
7272
NotificationType.INFORMATION);
7373
}
@@ -157,7 +157,7 @@ public static List<ProblemDescriptor> parseOutput(@NotNull final PsiFile psiFile
157157

158158
// Cppcheck error
159159
if (lineNumber <= 0 || lineNumber > document.getLineCount()) {
160-
CppcheckNotification.send("line number out-of-bounds " + i,
160+
CppcheckNotification.send("line number out-of-bounds for " + psiFile.getVirtualFile().getCanonicalPath(),
161161
id + " " + severity + " " + inconclusive + " " + errorMessage + " " + fileName + " " + lineNumber + " " + column,
162162
NotificationType.ERROR);
163163
continue;

src/com/github/johnthagen/cppcheck/CppcheckInspection.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public ProblemDescriptor[] checkFile(@NotNull final PsiFile file,
6464
tempFile.getName());
6565
return descriptors.toArray(new ProblemDescriptor[0]);
6666
} catch (final ExecutionException | CppcheckError | IOException | SAXException | ParserConfigurationException ex) {
67-
CppcheckNotification.send("execution failed",
67+
CppcheckNotification.send("execution failed for " + file.getVirtualFile().getCanonicalPath(),
6868
ex.getClass().getSimpleName() + ": " + ex.getMessage(),
6969
NotificationType.ERROR);
7070
} finally {

0 commit comments

Comments
 (0)