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

Customize codeclimate configuration re: docstrings #483

Closed
gabrielkrell opened this issue Oct 29, 2017 · 5 comments
Closed

Customize codeclimate configuration re: docstrings #483

gabrielkrell opened this issue Oct 29, 2017 · 5 comments
Labels
difficulty: medium fix is medium in difficulty status: help wanted requesting help from the community type: community enhancement feature request not on Twilio's roadmap

Comments

@gabrielkrell
Copy link
Contributor

Code Climate checks for repeated code in sendgrid-python, but it includes docstrings in these checks. It's OK for docstrings to be similar to each other, so Code Climate's configuration should be changed to treat text inside docstrings differently.

Code Climate's configuration file is here. An example of the current response to repetitive docstrings can be found here.

Steps to Reproduce

  1. Submit a pull request to sendgrid-python that contains repetitive docstrings.
@mbernier
Copy link
Contributor

Thanks for posting this @gabrielkrell

@nvzard
Copy link

nvzard commented Oct 30, 2017

@gabrielkrell I searched in CodeClimate's documentation but was not able to find a way to do this. We can exclude files and paths in .codeclimate.yml but I was not able to find how can we exclude the docstring pattern. Can you please guide me through this?

@gabrielkrell
Copy link
Contributor Author

gabrielkrell commented Oct 30, 2017

@nvzard According to their README, there's a "Node Filtering" option. I think it might be possible to ignore instances of a function declaration followed immediately by a triple-quoted string (or ones at the top of files, for module-level docstrings).

Alternatively, we could probably get away with just ignoring triple-quoted strings regardless of context; I don't think this repo uses them outside of docstrings.

We'll probably need to use Code Climate's parse tree output thing (also in that link) to see what repetitive docstring errors actually look like in the parse tree.

@thinkingserious thinkingserious added difficulty: medium fix is medium in difficulty type: community enhancement feature request not on Twilio's roadmap status: help wanted requesting help from the community up for grabs and removed good first issue labels Feb 27, 2018
@childish-sambino
Copy link
Contributor

This issue has been added to our internal backlog to be prioritized. Pull requests and +1s on the issue summary will help it move up the backlog.

@thinkingserious
Copy link
Contributor

Since there has been no activity on this issue since March 1, 2020, we are closing this issue. Please feel free to reopen or create a new issue if you still require assistance. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty: medium fix is medium in difficulty status: help wanted requesting help from the community type: community enhancement feature request not on Twilio's roadmap
Projects
None yet
Development

No branches or pull requests

5 participants