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
F14744434: D9195.diff
Tue, Jan 21, 9:04 AM
Unknown Object (File)
Dec 15 2024, 8:50 PM
Unknown Object (File)
Dec 15 2024, 7:27 AM
Unknown Object (File)
Dec 14 2024, 3:26 PM
Unknown Object (File)
Dec 9 2024, 3:59 PM
Unknown Object (File)
Dec 2 2024, 12:01 PM
Unknown Object (File)
Dec 2 2024, 10:29 AM
Unknown Object (File)
Nov 30 2024, 3:51 AM
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).