Page MenuHomePhabricator

Add an XHPAST linter rule to ensure that only one statement exists per line
AbandonedPublic

Authored by joshuaspence on Sep 8 2014, 3:57 AM.
Tags
None
Referenced Files
F15494851: D10440.diff
Sun, Apr 13, 1:53 AM
F15488042: D10440.id25367.diff
Thu, Apr 10, 6:54 PM
F15487912: D10440.id.diff
Thu, Apr 10, 6:03 PM
F15487879: D10440.id.diff
Thu, Apr 10, 5:42 PM
F15487119: D10440.id25105.diff
Thu, Apr 10, 11:23 AM
F15487066: D10440.id26636.diff
Thu, Apr 10, 10:56 AM
F15485907: D10440.id25130.diff
Thu, Apr 10, 3:26 AM
F15483150: D10440.diff
Wed, Apr 9, 10:17 AM
Subscribers

Details

Reviewers
epriestley
Group Reviewers
Blessed Reviewers
Summary

This is still a WIP. I would also like to add autofixing to this (although this may be difficult) and also add some whitelisted constructs, such as for loops. Just seeking some initial feedback.

Test Plan

WIP

Diff Detail

Repository
rARC Arcanist
Branch
xhpast-oneperline
Lint
Lint Passed
SeverityLocationCodeMessage
Advicesrc/lint/linter/ArcanistXHPASTLinter.php:49XHP47One Statement Per Line
Advicesrc/lint/linter/ArcanistXHPASTLinter.php:2523XHP47One Statement Per Line
Advicesrc/lint/linter/ArcanistXHPASTLinter.php:2534XHP47One Statement Per Line
Advicesrc/lint/linter/ArcanistXHPASTLinter.php:2534XHP47One Statement Per Line
Advicesrc/lint/linter/ArcanistXHPASTLinter.php:2534XHP47One Statement Per Line
Advicesrc/lint/linter/ArcanistXHPASTLinter.php:2537XHP47One Statement Per Line
Advicesrc/lint/linter/ArcanistXHPASTLinter.php:2541XHP47One Statement Per Line
Advicesrc/lint/linter/ArcanistXHPASTLinter.php:2549XHP47One Statement Per Line
Unit
Test Failures
Build Status
Buildable 2460
Build 2464: [Placeholder Plan] Wait for 30 Seconds

Unit TestsFailed

TimeTest
0 mstestXHPASTLint
0 mstestCSSLintLinter
0 mstestClosureLinter
0 mstestCoffeeLintLinter
0 mstestFixLetterCase
View Full Test Results (1 Failed · 21 Passed · 5 Skipped)

Event Timeline

joshuaspence retitled this revision from to Add an XHPAST linter rule to ensure that only one statement exists per line.
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence added a reviewer: epriestley.

Hmm, I wonder if looking for n_STATEMENT or whatever might be cleaner? Not sure if that would get you everything you want, though.

Perhaps... let me give that a try

joshuaspence edited edge metadata.

Use n_STATEMENT_LIST instead of the ; token. Provide replacement text

Rebase. Still not quite working

Rebase, still not quite ready

I'm going to merge this into D11504.