Skip to content

Support for Code Climate reporting format #418

Open

Description

@tribals

Would you plan to support reporting in Code Climate format?

This will allow usage of pyflakes as Code Climate engine, so many Python developers will be able to use it in their CI workflows.

It seems that the spec is not so complicated. If you agree with the need to support Code Climate reports, I'll implement it.

Activity

  1. sigmavirus24 commented on Jan 27, 2019

    @sigmavirus24
    Member

    Given that there are no command-line options that affect behaviour in this tool today, I suspect @bitglue will rule this out. I do think Flake8 would be able to easily implement this though and give you the Pyflakes output you want.

  2. tribals commented on Jan 27, 2019

    @tribals
    Author

    Did you mean that I should use flake8 instead?

    If so, I disagree. I'm using pyflakes exactly why I don't use flake8. It is that flake8 combines multiple tools in one: it checks for style of code as well as errors that can be caught at static analysis. I don't want so. I'm using another tool for code formatting according to style with which many of my teammates agree (it is black, if you are interested). So, I need just static analyzer which is exactly what is pyflakes.

    It is acceptable to introduce additional command line switch? If not, just close issue.

  3. asottile commented on Jan 27, 2019

    @asottile
    Member

    flake8 --select=F is basically "pyflakes but with features" if you're interested

  4. tribals commented on Jan 27, 2019

    @tribals
    Author

    Yes, I do. Thank you. I'll check this out.

  5. bitglue commented on Feb 6, 2019

    @bitglue
    Member

    I'm not familiar with the code climate format, but if it's just a matter of the appropriate syntax for errors, it would also be relatively simple to implement a small Python script which invokes pyflakes as a module and then outputs the appropriately formatted errors. See the implementation of main() for a starting point, then replace the reporter with whatever you need.

    If it helps people, it doesn't add any dependencies, and it's a small amount of code, I'm not opposed to including the implementation in pyflakes. I've tried to avoid any options that affect how or what gets checked, since if there are no false positives there should be nothing to configure. But an option to control the output formatting should be benign.

  6. reopened this on Feb 6, 2019
  7. sigmavirus24 commented on Feb 7, 2019

    @sigmavirus24
    Member

    Honestly, looking further into this, it seems like separate tools that import an API and use their own thing, e.g., https://github.com/codeclimate/codeclimate-eslint so I don't think this needs to live or be distributed with pyflakes

  8. tribals commented on Feb 7, 2019

    @tribals
    Author

    @bitglue This is exactly what I thought about last evening.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions