Page MenuHomePhabricator

Require valid comments to contain at least one non-whitespace character
ClosedPublic

Authored by epriestley on May 30 2019, 7:26 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Dec 17, 7:19 PM
Unknown Object (File)
Mon, Dec 16, 4:50 AM
Unknown Object (File)
Thu, Dec 12, 10:55 PM
Unknown Object (File)
Thu, Dec 12, 5:06 PM
Unknown Object (File)
Mon, Dec 9, 4:10 AM
Unknown Object (File)
Fri, Dec 6, 5:44 AM
Unknown Object (File)
Tue, Dec 3, 1:02 AM
Unknown Object (File)
Mon, Dec 2, 9:51 PM
Subscribers
None

Details

Summary

See downstream https://phabricator.wikimedia.org/T88655. This is very marginal, but we currently allow comments consisting of only whitespace.

These are probably always mistakes, so treat them like completely empty comments.

(We intentionally do not trim leading or trailing whitespace from comments when posting them becuase leading spaces can be used to trigger codeblock formatting.)

Test Plan
  • Posted empty, nonempty, and whitespace-only comments.
  • Whitespace-only comments now have the same behavior as truly empty comments (e.g., do not actually generate a transaction).

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable