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

Keep the messages states per file #938

Closed
PCManticore opened this issue Jun 16, 2016 · 3 comments
Closed

Keep the messages states per file #938

PCManticore opened this issue Jun 16, 2016 · 3 comments
Labels
Per directory config New per directory config feature

Comments

@PCManticore
Copy link
Contributor

This issue is circumstantial with #618, which proposes making PyLinter classes as lightweight as possible, targeting one file.

Currently, we have some problems related to the fact that the messages stores and states are for the current analyzed file and not for all the files that Pylint should analyze. This means that currently, we can't have the information about a pragma disable in another file, which would be useful for solving #214 for instance.

Moving to a global message store for all the files seems in line with #618. The changes that this issue involves, without taking in consideration #618 for now, could be to move the token checker outside of PyLinter class and creating one per file, parsing the files to get the AST and for getting the pragmas, holding the pragmas and other relevant information somewhere where the checkers could access them and removing the global bits from PyLinter, which should be per file, instead of relying on the current analyzed file.
Since we are rewriting how the PyLinter class acts and behave, I think this is the best time to refactor this.
@AWhetter let me know what do you think. I will try to come up with better details later on.

@PCManticore PCManticore added this to the 2.1 milestone Jun 16, 2016
@PCManticore
Copy link
Contributor Author

Also, this might seem additional work for #618, but I can help implementing this, as long as we put the basis on what we need to achieve (and what gets changed for #618 as well), so that we won't duplicate the effort.

@AWhetter
Copy link
Contributor

This sounds good to me! 👍

@AWhetter AWhetter added the Per directory config New per directory config feature label Jul 2, 2016
@PCManticore PCManticore modified the milestones: 3.0, 4.0 May 13, 2018
@PCManticore PCManticore removed this from the 4.0 milestone Sep 26, 2019
@DanielNoord
Copy link
Collaborator

I'm going to close this as we're no longer focusing on making PyLinter light-weight and reusable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Per directory config New per directory config feature
Projects
None yet
Development

No branches or pull requests

3 participants