I've used vim and python for decades, but since Syntastic has been deprecated, I recently switched to ALE.
I'm coding in Python 3.11 and running vim 8.1 under Linux Mint, and have created a virtual environment using python3.11 -m venv. I installed pylint into the venv with pip, because it made the ALE/pylint import errors go away, for the other modules I installed in the venv… this doesn't really make sense to me but it's less messy than the solutions I tried from StackOverflow/StackExchange.
My project is a fairly simple command-line tool with a flat directory hierarchy. I've created a pylintrc file in that directory, which simply contains:
[FORMAT] max-line-length=80 And I have the following options set in vim:
let g:ale_python_auto_virtualenv=1 let g:ale_python_pylint_options = '--rcfile ./pylintrc' I launch gvim from the command line, with my CWD set to where my pylintrc file is.
When I run pylint from the command line, it does not report this problem. This is true for both the system pylintrc (which is not the same version as in my venv—but oddly, in that case, it doesn't have trouble with the imports, either), and also when I run it from the venv Python.
I've pretty much proven that when vim/ALE runs pylint, it's not seeing my pylintrc file, because when I add garbage lines to it, it doesn't complain about them, while it does when I run it from the command line. [Edit: What I didn't notice is that it wasn't showing me pylint errors, either; rather, the errors that were appearing came from flake8. 😏] I've also created a .flake8 that sets the line length, just in case it's actually flake8 that's complaining. [Edit: Yeah, well, I stuffed that up, too—for some reason, it turns out, .flake8 needs a [flake8] header, and I didn't include that, so flake8 was ignoring that file.] The g:ale_python_pylint_options I added was an attempt to fix this problem, and I've even tried setting it to the absolute path to the pylintrc file.
Questions
How can I see the command that vim/ALE actually uses to invoke pylint? How can I see the raw output?
How can I tell which plug-in or app is generating the message?
I would also welcome suggestions for alternatives to ALE.