jendrikseipp / vulture

Find dead Python code
MIT License
3.28k stars 145 forks source link

option to output absolute pathnames of reported files #227

Open mcooperman opened 3 years ago

mcooperman commented 3 years ago

Using vulture as an External Tool with PyCharm. a linter, such as Flake8, outputs reported issues with absolute pathnames to the files. These are 'clickable' in the PyCharm Run UI, to jump directly to the related code. vulture (after testing outside of pycharm as well) seems to only output relative paths from the cwd without a leading / it appears that PyCharm relies on detecting paths in the Run output with the starting / (e.g. absolute path), for external tools anyway (Pylint has a more complex integration). if vulture had a command line option to tell it to output absolute paths, that would be helpful. I'd be happy to contribute.

jendrikseipp commented 3 years ago

Thanks for the report! Ideally, I'd like to find a solution that works for multiple editors. Do you know which format would be required for other popular editors (https://insights.stackoverflow.com/survey/2019#development-environments-and-tools)?

Are you sure flake8 uses absolute paths? Or does it come with an option for this? For me flake8 3.8.1 shows relative paths.