Skip to content

Commit 769b3b8

Browse files
committed
Merge pull request #26 from DonJayamanne/fixSpaceInPathForAutoPep
added double quotes to file name when linting, account for spaces in …
2 parents 350e80b + 4da15c9 commit 769b3b8

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/client/linters/flake8.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export class Linter extends baseLinter.BaseLinter {
1818
}
1919

2020
var flake8Path = this.pythonSettings.linting.flake8Path;
21-
var cmdLine = `${flake8Path} ${FLAKE8_COMMANDLINE} ${filePath}`;
21+
var cmdLine = `${flake8Path} ${FLAKE8_COMMANDLINE} "${filePath}"`;
2222
return new Promise<baseLinter.ILintMessage[]>((resolve, reject) => {
2323
this.run(cmdLine, filePath, txtDocumentLines).then(messages=> {
2424
//All messages in pep8 are treated as warnings for now

src/client/linters/pep8Linter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export class Linter extends baseLinter.BaseLinter {
1818
}
1919

2020
var pep8Path = this.pythonSettings.linting.pep8Path;
21-
var cmdLine = `${pep8Path} ${PEP_COMMANDLINE} ${filePath}`;
21+
var cmdLine = `${pep8Path} ${PEP_COMMANDLINE} "${filePath}"`;
2222
return new Promise<baseLinter.ILintMessage[]>(resolve => {
2323
this.run(cmdLine, filePath, txtDocumentLines).then(messages=> {
2424
//All messages in pep8 are treated as warnings for now

src/client/linters/pylint.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export class Linter extends baseLinter.BaseLinter {
3030
}
3131

3232
var pylintPath = this.pythonSettings.linting.pylintPath;
33-
var cmdLine = `${pylintPath} ${PYLINT_COMMANDLINE} ${filePath}`;
33+
var cmdLine = `${pylintPath} ${PYLINT_COMMANDLINE} "${filePath}"`;
3434
return new Promise<baseLinter.ILintMessage[]>((resolve, reject) => {
3535
this.run(cmdLine, filePath, txtDocumentLines).then(messages=> {
3636
messages.forEach(msg=> {

0 commit comments

Comments
 (0)