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

ament_pep257 does not match pydocstyle's pep257 definition #240

Closed
Arnatious opened this issue May 11, 2020 · 0 comments · Fixed by #241
Closed

ament_pep257 does not match pydocstyle's pep257 definition #240

Arnatious opened this issue May 11, 2020 · 0 comments · Fixed by #241

Comments

@Arnatious
Copy link
Contributor

The set of ignores that defines pep257 in pydocstyle http://www.pydocstyle.org/en/latest/error_codes.html#default-conventions

['D203', 'D212', 'D213', 'D214', 'D215', 'D404', 'D405', 'D406', 'D407', 'D408', 'D409', 'D410', 'D411', 'D413', 'D415', 'D416', 'D417']

versus the set of default ignores in ament_pep257

['D100', 'D101', 'D102', 'D103', 'D104', 'D105', 'D106', 'D107', 'D203', 'D212', 'D404']

Results in the following checks that are not part of pep257 being run

['D213', 'D214', 'D215', 'D405', 'D406', 'D407', 'D408', 'D409', 'D410', 'D411', 'D413', 'D415', 'D416', 'D417']

pydocstyle generates the list of codes to check by either using a convention or an ignore list. ament_pep257 currently uses --ignore

'--ignore=' + ','.join(ignore),

This should probably be changed to --add-ignore. Then, pydocstyle will default to using --convention=pep257, and then pep257's defaults are used in addition to any user specified ignores.

We can simplify the default ignores at that point to just ['D1']

default=[
'D100', 'D101', 'D102', 'D103', 'D104', 'D105', 'D106', 'D107',
'D203', 'D212', 'D404',
],

Arnatious pushed a commit to Arnatious/ament_lint that referenced this issue May 12, 2020
Signed-off-by: Ted Kern <ted.kern@canonical.com>
Arnatious pushed a commit to Arnatious/ament_lint that referenced this issue Jun 12, 2020
Signed-off-by: Ted Kern <ted.kern@canonical.com>
Arnatious pushed a commit to Arnatious/ament_lint that referenced this issue Jun 25, 2020
Signed-off-by: Ted Kern <ted.kern@canonical.com>
hidmic pushed a commit that referenced this issue Jul 14, 2020
* Expand ignores to pep257 definition. (ament #240)

Signed-off-by: Ted Kern <ted.kern@canonical.com>

* add '--allow-undocumented' flag to enforce pep257

Signed-off-by: Ted Kern <ted.kern@canonical.com>

* restore existing default error codes to check

Signed-off-by: Ted Kern <ted.kern@canonical.com>

* fix no-ignores logic

Signed-off-by: Ted Kern <ted.kern@canonical.com>

* expose options from pydocstyle

Signed-off-by: Ted Kern <ted.kern@canonical.com>

* allow user to explicitly set convention to "ament"

Signed-off-by: Ted Kern <ted.kern@canonical.com>

* fix typo in populating argv for pydocstyle

Signed-off-by: Ted Kern <ted.kern@canonical.com>

* reformat ament convention list

Signed-off-by: Ted Kern <ted.kern@canonical.com>

* Add help info for ament convention

Signed-off-by: Ted Kern <ted.kern@canonical.com>
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 a pull request may close this issue.

1 participant