Page MenuHomePhabricator

Add a rule to the XHPAST linter to check for whitespace before a semicolon.
ClosedPublic

Authored by joshuaspence on May 19 2014, 1:49 PM.
Tags
None
Referenced Files
F19469790: D9195.id.diff
Mon, Jan 5, 4:09 AM
F19216227: D9195.id21840.diff
Wed, Dec 17, 6:59 AM
F19052652: D9195.diff
Nov 28 2025, 5:26 AM
F19038291: D9195.id21835.diff
Nov 26 2025, 3:57 AM
F18807943: D9195.id21840.diff
Oct 19 2025, 4:04 AM
F18597927: D9195.diff
Sep 13 2025, 3:58 AM
Unknown Object (File)
Jun 14 2025, 10:54 PM
Unknown Object (File)
Jun 14 2025, 10:18 PM
Subscribers

Details

Summary

This rule is based on a rule from PHP_CodeSniffer.

Test Plan

Wrote and executed unit tests.

Diff Detail

Repository
rARC Arcanist
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

joshuaspence retitled this revision from to Add a rule to the XHPAST linter to check for whitespace before a semicolon..
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence added a reviewer: epriestley.
epriestley edited edge metadata.

The only exception I can think of is that we might have some of this kind of thing:

for (       ; $ii < $limit; $ii++) {

...but that's probably better written as:

for (/* empty */; $ii < $limit; $ii++) {

...or similar.

This revision is now accepted and ready to land.May 19 2014, 2:48 PM
epriestley updated this revision to Diff 21840.

Closed by commit rARCb251615716b3 (authored by @joshuaspence, committed by @epriestley).