JetBrains / teamcity-messages

Python Unit Test Reporting to TeamCity
https://pypi.python.org/pypi/teamcity-messages
Apache License 2.0
137 stars 81 forks source link

Pylint inspection reporter #171

Closed rhbvkleef closed 5 years ago

rhbvkleef commented 6 years ago

Would it be possible to add a pylint inspection reporter?

shalupov commented 6 years ago

Currently pylint is supported via pytest-pylint: https://pypi.python.org/pypi/pytest-pylint Probably you're interested in flake8 support too

PetrWolf commented 6 years ago

Hi! I'd like to work on this an turn PyLint messages into appropriate code inspection messages, enabling direct integration with TeamCity Code Inspection tab.

That approach has the benefit of fully utilizing the TeamCity Code Inspection tab, including IDE integration, issue categorization, tracking etc.

PyLint enables such extensions easily through custom Reporter classes.

I have a small prototype and should be able to create a pull request in the next couple of weeks. Please let me know if this makes sense to you.

shalupov commented 6 years ago

@PetrWolf It makes sense, thanks (using pytest-pylint is not that convenient).

Please take a look at the existing code at https://github.com/JetBrains/teamcity-messages/blob/master/teamcity/flake8_v3_plugin.py

For a PR please write at least one integration test to verify your code will work in couple of years too: https://github.com/JetBrains/teamcity-messages/blob/master/tests/integration-tests/flake8_test.py

PetrWolf commented 5 years ago

Apologies for the delay. I should be able to send a pull request within a month.

PetrWolf commented 5 years ago

Please see a proposed way of integrating PyLint with Teamcity in PR #200 .

While using the forked version, I successfully tested this on several projects, but observed a strange TeamCity behavior in reporting all issues as new each time. More details on that under TW-59058

shalupov commented 5 years ago

Released 1.24 with pylint support. Thanks @PetrWolf

PetrWolf commented 5 years ago

Great! Thank you!