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

Recommended way to obtain a message description #2936

Closed
PetrWolf opened this issue May 26, 2019 · 2 comments
Closed

Recommended way to obtain a message description #2936

PetrWolf opened this issue May 26, 2019 · 2 comments

Comments

@PetrWolf
Copy link

Question

Dear PyLint maintainers,

I recently helped add a PyLint plugin to the JetBrains/teamcity-messages project, integrating PyLint with the Code Inspection feature of TeamCity.

The code uses a custom Reporter to emit special "service message" to TeamCity for each encountered issue. It also registers each unique issue type and that's where I ran into problems.

I used MessagesStore.get_message_definition() to retrieve a full description of an issue type, which worked fine, but it turns out this was moved and renamed in a recent PyLint release. I can adapt the code based on PyLint version, but perhaps there is a better way?

Please could you recommend a way of retrieving a description of a message given its message if (from a custom reporter)?

Thank you!

@PCManticore
Copy link
Contributor

Hey @PetrWolf

Sorry for all this mess, we recently overhauled our message handling and we had to change a few things here and there in a backwards incompatible way.

Right now the authoritative way of grabbing the messages is using MessagesStore .get_message_definitions() which returns a list of MessageDefinition instances.

Let me know if that helps.

@PetrWolf
Copy link
Author

Thank you, that works.

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

No branches or pull requests

2 participants