-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Figure out a better way of registering options? #2355
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
Comments
I would not mind for the processing of option to be handled by The checker could also use composition instead of inheritance in order to get their options. It would break the coupling we have right now between option parsing and code analysis. Changing the way option work is made very difficult because of this coupling. Test are using the checker by giving option to Optparse, so the refactor of option registering is huge because of that if you change the option registering you need to change the checker tests too (!). So I think it might be necessary to first make the BaseChecker an independent base class before actually doing anything to make options registering better. |
@Pierre-Sassoulas Is there a reason why options are given to To me it seems much more logical to add all options to Problems to consider would be:
|
I think it's theorically possible to launch a single checker but in practice we never do that and always use pylint through the pylinter. Might not be true for plugins ? |
Yeah, that's what I was wondering. Do we have an "plugin expert" who would know this? |
@Pierre-Sassoulas I think we can close this? There is still #5829, but I think that deserves its own issue and doesn't necessarily fall under this one. |
All of the config parsers (the CLIParser and the IniFileParser) need the option definitions and so does the Configuration. Registering a checker means registering options, which means the PluginRegistry needs a callback function to give these options to all of these objects.
The text was updated successfully, but these errors were encountered: