doctor-rst
doctor-rst copied to clipboard
Forbid certain types for directive (should be configurable) with an optional replacement
Spotted in
- https://github.com/symfony/symfony-docs/pull/18012/files
cc @alamirault
Or we can create a rule which only allows x,y,z type for directive N, maybe that's better, because the input can differ (typos etc.)
Hello :)
I looked at the existing rules when making the pr on docs. The attribute
was spotted as non existent so i guess job was done, wasn't ?
No I am thinking about a rule where the project can define allowed code-block directive types.
Symfony would allow: php-attributes php-standalone yaml
Etc.
The referenced PR would then fail with sth like:
"Type "attribute" is not allowed for code-block directive. Allowed ones are: ......"
I hope it's more clear now