Page MenuHomePhabricator

Add a linter rule for newlines after PHP open tags
ClosedPublic

Authored by joshuaspence on Jul 2 2015, 9:43 PM.
Tags
None
Referenced Files
F18184920: D13534.id33867.diff
Sat, Aug 16, 2:36 PM
F18108009: D13534.id33881.diff
Mon, Aug 11, 4:21 AM
F18105819: D13534.id32714.diff
Sun, Aug 10, 7:53 PM
F18091452: D13534.id33867.diff
Wed, Aug 6, 9:43 PM
F18091451: D13534.id33534.diff
Wed, Aug 6, 9:43 PM
F18091450: D13534.id32714.diff
Wed, Aug 6, 9:43 PM
F18053606: D13534.id33867.diff
Mon, Aug 4, 5:14 AM
F18049333: D13534.id33534.diff
Sun, Aug 3, 4:02 PM
Subscribers

Details

Summary

<?php\n\n... is much easier to read than <?php\n.... Depends on D13889 and D13890.

Test Plan

Added unit tests.

Diff Detail

Repository
rARC Arcanist
Branch
master
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 7839
Build 8710: [Placeholder Plan] Wait for 30 Seconds
Build 8709: arc lint + arc unit

Event Timeline

joshuaspence retitled this revision from to Add a linter rule for newlines after PHP open tags.
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence added a reviewer: epriestley.
epriestley edited edge metadata.
epriestley added inline comments.
src/lint/linter/xhpast/rules/ArcanistNewlineAfterOpenTagXHPASTLinterRule.php
29

I think this phrasing is maybe a little ambiguous, since it doesn't mean "a single newline character", but could be interpreted like that (i.e. "<?php\n1+1" has "a single newline character", but is not desired). Maybe "an empty line"?

This revision is now accepted and ready to land.Jul 2 2015, 9:48 PM

The fact that I needed to modify so many lint-test files was motivation for D14010.

This revision was automatically updated to reflect the committed changes.