Hi, I wonder where the pylint output file is store...
# general
Hi, I wonder where the pylint output file is stored when running
pants lint
. I notice that pants 2.9.0.dev2 uses pylint 2.11.0+, which supports
option for generating report file. I have that specified as
[pylint].args = "--output=./pylint.report.txt"
in pants.toml. I observe that the output isn't printed on the console but, after the run, I can't find the generated report anywhere under the project root. Maybe I forgot to check somewhere else?
Py lint is invoked in a sandbox, that’s why you don’t see the file in your project. Try with
Normally we capture linter reports from the sandbox and copy them under
, but it looks like we don't do that for pylint
So will have to add that feature
@happy-pizza-30507 could you file an issue at https://github.com/pantsbuild/pants/issues ? Thanks!
But yeah, @curved-television-6568 hack should work in the meantime, looks like you can give
an absolute path, so you can send that report anywhere...
Thanks for explaining. Issue updated: https://github.com/pantsbuild/pants/issues/13686 Moreover, it seems pants keeps cancelling & rescheduling the linting process with
. I'm getting the below output when running on osx. Not knowing the exact internals, I guess that the files in
are being monitored by pants and writing pylint report file right there invalidates the linting process in some way, causing a new job to be rescheduled (and to be invalidated again). Specifying the report under "dist" directory seems to be a better choice.
Copy code
❯ ./pants lint ::
22:32:51.67 [INFO] Initializing scheduler...
22:32:51.81 [INFO] Scheduler initialized.
22:32:53.62 [INFO] Filesystem changed during run: retrying `Lint` in 500ms...
22:32:54.55 [INFO] Filesystem changed during run: retrying `Lint` in 500ms...
Interrupted by user.
Yeah, you will want to write it to a folder included in the option
, list the