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
Unknown Object (File)
Sat, Jun 14, 10:54 PM
Unknown Object (File)
Sat, Jun 14, 10:18 PM
Unknown Object (File)
May 4 2025, 12:34 AM
Unknown Object (File)
Apr 15 2025, 7:14 PM
Unknown Object (File)
Mar 27 2025, 6:44 PM
Unknown Object (File)
Mar 24 2025, 11:55 AM
Unknown Object (File)
Mar 24 2025, 10:58 AM
Unknown Object (File)
Mar 23 2025, 1:54 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).