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

Maintain and document a list of equivalent messages in other tools #8579

Open
9 tasks
Pierre-Sassoulas opened this issue Apr 15, 2023 · 3 comments
Open
9 tasks

Comments

@Pierre-Sassoulas
Copy link
Member

Pierre-Sassoulas commented Apr 15, 2023

Current problem

There's overlap with other tools message, and pylint is slower. (If ruff does it and fix it then you probably don't want to check a message in pylint). There's also the possibiity to use existing noqa so using multiple linter is easier.

Desired solution

A wish list of thing I thought about but that are open for discussion of course:

  • A data structure linking equivalent messages from pylint to message from other tools (wrong import position -> message in isort / ruff)
  • Inclusion of this information in our documentation (beside the manually generated list from our doc)
  • Auto-populated from what is implemented in ruff, in ruff case (See script in [readme.md] Automated link to pylint documentation using pre-commit astral-sh/ruff#2546)
  • An indication of the possibility to autofix with other tools (isort and ruff autofix wrong-import-order for example)
  • A check that the result is equivalent in our functional tests
  • Adding this information in our doc if the check is not equivalent
  • Check that the autofix from other tools if they exists actually fix the problem in our functional test file
  • Adding this information in our doc if the autofix is incomplete
  • disable/noqa from other tools, automatically disabling pylint's own messages

Additional context

#2493
astral-sh/ruff#2546
https://pylint.readthedocs.io/en/latest/faq.html#which-messages-should-i-disable-to-avoid-duplicates-if-i-use-other-popular-linters

@Pierre-Sassoulas
Copy link
Member Author

@antonagestam
Copy link

@Pierre-Sassoulas Perhaps it'd even be possible to introduce profiles, so that users can define what other tools they're using, and that would disable a set of checks?

@Pierre-Sassoulas
Copy link
Member Author

Yeah, that would need #7120 though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants