Skip to content

Commit

Permalink
Move pytlint plugin into pypi package
Browse files Browse the repository at this point in the history
It was not possible to import a bundled python file because the path contains '.vsode', which is not a valid python module.
  • Loading branch information
Peter Hagen committed Nov 6, 2019
1 parent 8f97b30 commit b9c5e73
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 47 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vscode-starlark",
"displayName": "vscode-starlark",
"description": "Linting and IntelliSense for Starlark files.",
"version": "0.1.0",
"version": "0.2.0",
"languageServerVersion": "0.4.24",
"publisher": "phgn",
"author": {
Expand Down Expand Up @@ -790,7 +790,7 @@
}
},
"scripts": {
"package": "gulp clean && gulp prePublishBundle && vsce package -o ms-python-insiders.vsix",
"package": "gulp clean && gulp prePublishBundle && vsce package -o vscode-starlark.vsix",
"compile": "tsc -watch -p ./",
"compile-webviews-watch": "npx npx -n --max_old_space_size=4096 webpack --config webpack.datascience-ui.config.js --watch",
"dump-datascience-webpack-stats": "npx -n --max_old_space_size=4096 webpack --config webpack.datascience-ui.config.js --profile --json > tmp/ds-stats.json",
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ jedi==0.15.1
parso==0.5.1
isort==4.3.21
pyparsing==2.4.0
pylint-starlark-plugin
3 changes: 1 addition & 2 deletions src/client/linters/pylint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,12 @@ export class Pylint extends BaseLinter {
+ ',E1304,E1305,E1306,E1310,E1700,E1701'
];
}
const extensionRootDir = path.dirname(path.dirname(path.dirname(__dirname))); // go upwards from this file's location
const args = [
'--msg-template=\'{line},{column},{category},{symbol}:{msg}\'',
'--reports=n',
'--output-format=text',
'--load-plugins',
`${extensionRootDir}/starlark/pylint/starlarkPlugin`,
`pylint_starlark_plugin`,
uri.fsPath
];
const messages = await this.run(minArgs.concat(args), document, cancellation, REGEX);
Expand Down
42 changes: 0 additions & 42 deletions starlark/pylint/starlarkPlugin.py

This file was deleted.

0 comments on commit b9c5e73

Please sign in to comment.