Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[imp] pyls allows arguments passed to pylint #928

Merged
merged 1 commit into from
Jul 29, 2019

Conversation

mpanarin
Copy link
Collaborator

@mpanarin mpanarin commented Jul 8, 2019

pyls allows arguments passed to pylint: palantir/python-language-server#539

@jml
Copy link

jml commented Jul 27, 2019

I just independently came up with almost exactly the same change:

modified   lsp-pyls.el
@@ -151,6 +151,13 @@ complexity."
   :group 'lsp-pyls
   :package-version '(lsp-mode . "6.1"))
 
+(defcustom lsp-pyls-plugins-pylint-args nil
+  "Command-line arguments to pylint."
+  :risky t
+  :type '(repeat string)
+  :group 'lsp-pyls
+  :package-version '(lsp-mode . "6.1"))
+
 (defcustom lsp-pyls-plugins-pycodestyle-enabled t
   "Enable or disable the plugin."
   :type 'boolean
@@ -305,6 +312,7 @@ at all."
    ("pyls.plugins.pycodestyle.exclude" lsp-pyls-plugins-pycodestyle-exclude)
    ("pyls.plugins.pycodestyle.enabled" lsp-pyls-plugins-pycodestyle-enabled t)
    ("pyls.plugins.pylint.enabled" lsp-pyls-plugins-pylint-enabled t)
+   ("pyls.plugins.pylint.args" lsp-pyls-plugins-pylint-args)
    ("pyls.plugins.preload.modules" lsp-pyls-plugins-preload-modules)
    ("pyls.plugins.preload.enabled" lsp-pyls-plugins-preload-enabled t)
    ("pyls.plugins.mccabe.threshold" lsp-pyls-plugins-mccabe-threshold)

I can confirm that this works for me, and that the tests pass with this change.

I added risky since pylint has command-line options that can execute arbitrary code. I strongly suggest updating this PR to do likewise.

Came across this while trying to solve palantir/python-language-server#616 (comment)

@mpanarin mpanarin changed the title [WIP] pyls allows arguments passed to pylint [imp] pyls allows arguments passed to pylint Jul 29, 2019
@mpanarin
Copy link
Collaborator Author

@jml understandable, updated
@yyoncho this can be merged, I think

@yyoncho yyoncho merged commit 4877161 into emacs-lsp:master Jul 29, 2019
@yyoncho
Copy link
Member

yyoncho commented Jul 29, 2019

Thank you!

jml added a commit to jml/dotfiles that referenced this pull request Sep 17, 2019
Work around the issue
palantir/python-language-server#616, which would be
fixed by emacs-lsp/lsp-mode#928, but is not yet
merged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants