SatelliteQE / robottelo

Robottelo is a test suite that exercises The Foreman.
GNU General Public License v3.0
61 stars 114 forks source link

pre-commit check for duplicate tags in docstrings #8213

Open pondrejk opened 3 years ago

pondrejk commented 3 years ago

Turns out that incidentally supplying a tag several times within a docstings goes unnoticed in pre-commit checks

mshriver commented 3 years ago

Made a quick test file - if multiple tokens are provided within one docblock, the last token is what is used - they are not combined automatically.

This comes down to testimony validation and parsing behavior here: https://github.com/SatelliteQE/testimony/blob/master/testimony/parser.py#L116

I think testimony should own validation of these duplicate tokens, not anything specific to robottelo pre-commit. This would include the check in github workflow for PRs, but wouldn't validate during pre-commit.

Moving make test-docstrings into pre-commit would be a slightly different conversation, because that would be a bit slow for use in pre-commit.