Skip to content

Commit 893e4ee

Browse files
committed
Only scan files which actually exist - fixes #38
1 parent 105c4a3 commit 893e4ee

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ Deployment.
5959

6060
- Parse `--xml` output instead of text output. (Contribution by @firewave)
6161
- Fixed scanning of files with whitespaces in name. (Contribution by @firewave)
62+
- Only scan files which actually exist. (Contribution by @firewave)
6263

6364
### 1.5.1 - 2020-11-12
6465

resources/META-INF/plugin.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
<change-notes><![CDATA[
6464
- Parse --xml output instead of text output. (Contribution by @firewave)<br/>
6565
- Fixed scanning of files with whitespaces in name. (Contribution by @firewave)
66+
- Only scan files which actually exist. (Contribution by @firewave)
6667
]]>
6768
</change-notes>
6869

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public ProblemDescriptor[] checkFile(@NotNull PsiFile file,
2929
@NotNull InspectionManager manager,
3030
boolean isOnTheFly) {
3131
final VirtualFile vFile = file.getVirtualFile();
32-
if (vFile == null || !isCFamilyFile(vFile)) {
32+
if (vFile == null || !vFile.isInLocalFileSystem() || !isCFamilyFile(vFile)) {
3333
return ProblemDescriptor.EMPTY_ARRAY;
3434
}
3535

0 commit comments

Comments
 (0)