Repository navigation
Conversation
49db54f to
8e978d9
Compare
jaapio
left a comment
There was a problem hiding this comment.
If we would wire another log channel rather than app into the rules for these kid of warnings we could create a basic violation framework. Monolog supports log channels.
Another idea could be that we introduce a customized Violations class that we inject into rules or via the parser context. This would allow us to collect validation issues and print them to a separate file. This could also help with my idea on having validation on directives.
Using the context has the benefit of having it always available.
In the first iteration the validation errors and warnings could be simply printed to console using s logger, on a later version we could start adding configuration, and extend this more and more.
How does that sound to you?
8e978d9 to
d579c22
Compare
A typo like `.. confval::passwordPolicies` makes the whole block disappear without any diagnostic: without whitespace after "::" it is no directive, so it is parsed as a comment and dropped before any node reaches the theme. The TYPO3 Core API documentation shipped several such blocks unnoticed: a confval that lost its anchor and inventory entry, a code block that swallowed the following prose, and index entries that were never generated. A comment starting with a name directly followed by "::" and more text now logs a warning with the corrected spelling. Real comments practically never start like that. Consecutive comments are consumed as one block, so each of them is checked. Signed-off-by: linawolf Assisted-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
d579c22 to
cbe11c4
Compare
[FEATURE] Warn about comments that look like a directive without a space
A typo like
.. confval::passwordPoliciesmakes the whole blockdisappear without any diagnostic: without whitespace after "::" it is no
directive, so it is parsed as a comment and dropped before any node
reaches the theme. The TYPO3 Core API documentation shipped several such
blocks unnoticed: a confval that lost its anchor and inventory entry, a
code block that swallowed the following prose, and index entries that
were never generated.
A comment starting with a name directly followed by "::" and more text
now logs a warning with the corrected spelling. Real comments practically
never start like that. Consecutive comments are consumed as one block,
so each of them is checked.
Signed-off-by: linawolf
Assisted-By: Claude Opus 5.5 (1M context) noreply@anthropic.com