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
F15411281: D13534.diff
Wed, Mar 19, 8:58 AM
F15411230: D13534.diff
Wed, Mar 19, 8:55 AM
F15411168: D13534.diff
Wed, Mar 19, 8:53 AM
F15411163: D13534.diff
Wed, Mar 19, 8:52 AM
F15411032: D13534.diff
Wed, Mar 19, 8:47 AM
F15410183: D13534.diff
Wed, Mar 19, 6:52 AM
F15403840: D13534.diff
Tue, Mar 18, 5:03 AM
F15396252: D13534.id33881.diff
Sun, Mar 16, 12:58 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
Test Failures
Build Status
Buildable 7122
Build 7296: [Placeholder Plan] Wait for 30 Seconds
Build 7295: 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
28

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.