Sendgrid-python: Customize codeclimate configuration re: docstrings

Created on 29 Oct 2017  路  5Comments  路  Source: sendgrid/sendgrid-python

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.
medium help wanted community enhancement

All 5 comments

Thanks for posting this @gabrielkrell

@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?

@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.

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.

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!

Was this page helpful?
0 / 5 - 0 ratings