doctor-rst icon indicating copy to clipboard operation
doctor-rst copied to clipboard

Forbid certain types for directive (should be configurable) with an optional replacement

Open OskarStark opened this issue 1 year ago • 3 comments

Spotted in

  • https://github.com/symfony/symfony-docs/pull/18012/files

cc @alamirault

OskarStark avatar Mar 07 '23 05:03 OskarStark

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

OskarStark avatar Mar 07 '23 05:03 OskarStark

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 ?

MrYamous avatar Mar 07 '23 19:03 MrYamous

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

OskarStark avatar Mar 08 '23 11:03 OskarStark