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
Unknown Object (File)
Sun, Apr 28, 4:29 PM
Unknown Object (File)
Thu, Apr 25, 3:20 AM
Unknown Object (File)
Fri, Apr 19, 2:08 AM
Unknown Object (File)
Thu, Apr 11, 10:41 AM
Unknown Object (File)
Thu, Apr 4, 1:28 PM
Unknown Object (File)
Mar 27 2024, 2:04 PM
Unknown Object (File)
Mar 10 2024, 4:07 PM
Unknown Object (File)
Feb 20 2024, 3:48 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
master
Lint
Lint Passed
Unit
Test Failures
Build Status
Buildable 4052
Build 4065: [Placeholder Plan] Wait for 30 Seconds

Unit TestsFailed

TimeTest
4,615 msArcanistXHPASTLinterTestCase::testLinter
672 msArcanistCSSLintLinterTestCase::testLinter
126 msArcanistCSSLintLinterTestCase::testVersion
186 msArcanistChmodLinterTestCase::testLinter
222 msArcanistClosureLinterTestCase::testLinter
View Full Test Results (1 Failed · 38 Passed · 12 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.