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)
Sep 29 2024, 11:31 AM
Unknown Object (File)
Sep 26 2024, 8:28 AM
Unknown Object (File)
Sep 5 2024, 5:58 PM
Unknown Object (File)
Sep 1 2024, 9:30 AM
Unknown Object (File)
Sep 1 2024, 9:30 AM
Unknown Object (File)
Sep 1 2024, 9:30 AM
Unknown Object (File)
Sep 1 2024, 9:16 AM
Unknown Object (File)
Aug 25 2024, 1:19 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).