Revision control
Copy as Markdown
# R55 (skill-language-style): a table cell must not be blank in a data
# column; use "None"/"Not applicable" instead.
#
# The selector picks each table row that has a blank data cell: `td:empty`
# matches a `\li` with no content (whitespace-only cells count as empty).
# Header cells are `th`, so a blank `\header` cell isn't flagged, and a blank
# `\list` item is `li`, not `td`, so lists aren't flagged either.
#
# The rule is `existence` on the row, not `occurrence` on the cell: an empty
# `td` has no text to count, and an `occurrence` rule whose selector matches
# nothing still reports a zero count at 1:1. `existence` on the row fires
# only when the selector matches, and reports one alert per row, at the
# row's first text.
#
# Known gaps: a row whose cells are all blank has no text for `existence` to
# match, so it isn't flagged. The rule also can't tell an intentionally blank
# "Notes"-style column (R55's own documented exception) from a data column.
extends: existence
message: "Empty table cell; use 'None' or 'Not applicable' instead of leaving it blank (see R55)."
link: https://learn.microsoft.com/en-us/style-guide/scannable-content/tables
level: suggestion
scope: 'doc(tr:has(> td:empty))'
nonword: true
raw:
- '(?s)\S.*'