Skip to content

Commit 105c4a3

Browse files
committed
Fixed scanning of files with whitespaces in name
1 parent 4b97ac0 commit 105c4a3

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ Deployment.
5757

5858
### 1.6.0 - XXXX-XX-XX
5959

60-
Parse `--xml` output instead of text output. (Contribution by @firewave)
60+
- Parse `--xml` output instead of text output. (Contribution by @firewave)
61+
- Fixed scanning of files with whitespaces in name. (Contribution by @firewave)
6162

6263
### 1.5.1 - 2020-11-12
6364

resources/META-INF/plugin.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@
6161
]]></description>
6262

6363
<change-notes><![CDATA[
64-
Parse --xml output instead of text output. (Contribution by @firewave)<br/>
64+
- Parse --xml output instead of text output. (Contribution by @firewave)<br/>
65+
- Fixed scanning of files with whitespaces in name. (Contribution by @firewave)
6566
]]>
6667
</change-notes>
6768

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ public static String executeCommandOnFile(@NotNull final String command,
182182
final GeneralCommandLine cmd = new GeneralCommandLine()
183183
.withExePath(command)
184184
.withParameters(ParametersListUtil.parse(options))
185-
.withParameters(ParametersListUtil.parse(filePath));
185+
.withParameters(ParametersListUtil.parse("\"" + filePath + "\""));
186186

187187
// Need to be able to get python from the system env
188188
if (cppcheckMisraPath != null && !cppcheckMisraPath.isEmpty()) {

0 commit comments

Comments
 (0)