Commit 2026-10-06 10:22 b8ec8801
View on Github →feat(Linter/Header): allow enabling Verso before module doc (#44158)
This PR allows four specific set_option commands to come between the imports and the main module doc, without complaints from the header linter. The options are:
doc.versodoc.verso.moduledoc.verso.suggestionslinter.style.headerTheseversooptions control the parsing of module docs in the current file and so have to come before module docs. I decided to implement the change by extending the import parser into anallowedHeaderParserwhich accepts import lines (usingParseImportsFast's import parser) followed by thoseset_optioncommands (using a parser that does nothing with the import parsing state except maybe report errors: the import parsing state is thrown away anyway by the header linter). This seems the least invasive compared to the existing check, but maybe there's a different (more efficient?) way to go about it.