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

Added pylint-parseable formatter #712

Merged
merged 2 commits into from
Jan 14, 2025

Conversation

joacortez
Copy link
Contributor

@joacortez joacortez commented Jan 13, 2025

Description

Added a new output format called pylint-parseable that follows this format: {path}:{line}: [{msg_id}({symbol}), {obj}] {msg}.
Updated a comment in the existing pylint formatter to reflect the actual formatting generated by the formatter and updated the docs accordingly.

Related Issue

Motivation and Context

When trying to integrate prospector into a CI/CD tool I realized that the pylint output does not follow the same output format as when using pylint --output-format=parseable (see Pylint 3.3.3 Documentation The existing format includes the character in the output which makes it difficult for it to be used as a drop-in-replacement. I added a new formatter that uses the format mentioned in the docs. I added a new formatter to avoid make a breaking change.

How Has This Been Tested?

Since this does not affect other areas it was only tested using some existing python projects to test the output.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • My change requires a change to the dependencies
  • I have updated the dependencies accordingly
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Copy link
Member

@sbrunner sbrunner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good :-)

prospector/formatters/pylint_parseable.py Outdated Show resolved Hide resolved
Co-authored-by: Stéphane Brunner <[email protected]>
@carlio carlio merged commit f658e0a into prospector-dev:master Jan 14, 2025
5 checks passed
@joacortez
Copy link
Contributor Author

Thanks for reviewing and approving my PR :)
Are these changes going to be included in the next release? If so is there a timeline for it?
Thanks :)

@sbrunner
Copy link
Member

In about one month I will create a new release :-)

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

Successfully merging this pull request may close these issues.

3 participants