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.verso
  • doc.verso.module
  • doc.verso.suggestions
  • linter.style.header These verso options 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 an allowedHeaderParser which accepts import lines (using ParseImportsFast's import parser) followed by those set_option commands (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.

Estimated changes