Jump to content

Parsoid/Adding a new lint category

From mediawiki.org

When adding a new type of lint error, one should:

  1. File a ticket in phab describing the pattern that's going to be linted away
  2. Pick a priority for the lint error. Options are currently: high, medium, low, and none.
    • high priority errors have generally been those that are blocking work of the Content Transform Team, not so much about how egregious the errors the syntax is causing, although maybe that's one competing interest. The linter extension was introduced during the tidy migration with a goal of trying to minimize the damage of switching from Tidy to Remex, an HTML5 parser, which is why a lot of the high priority errors are about HTML4 vs HTML5 semantics.
    • none is a special priority with the intention of hiding the lint errors from the UIs and workflows of editors, to experiment with new lint errors without disruption. It's different from disabling a category. See T334527 and Help:Lint_errors#Hidden_lint_issues for more information about hidden lints.
  3. Solicit feedback from the linting community (example)
  4. Add a help page for the new lint error at Help:Lint_errors/new-lint-name
  5. Write a patch to the Linter extension (example) adding the dbid
    • Typically, this is deployed first so that the extension is prepared to handle lint errors with the new id. (Although there's been some work so maybe that's not strictly necessary anymore, see this and this)
  6. Write a patch to core for i18n (example)
    • This entanglement can hopefully be reduced in T360809
  7. Write a patch to Parsoid (example) emitting lint errors with the new id
  8. Consider making an announcement in meta:Tech News about the new lint error (example)
  9. Update the list of lint errors on Help:Lint_errors, w:Wikipedia:Linter, Special:LintErrors (on every affected MW installation)