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
F13281056: D13534.diff
Sun, Jun 2, 9:40 AM
F13268024: D13534.diff
Wed, May 29, 4:31 AM
F13253510: D13534.diff
Sat, May 25, 2:43 AM
F13230961: D13534.diff
Mon, May 20, 11:28 PM
F13222544: D13534.id33534.diff
Sun, May 19, 3:45 AM
F13186061: D13534.diff
Sat, May 11, 3:24 AM
Unknown Object (File)
Tue, May 7, 12:49 PM
Unknown Object (File)
Tue, May 7, 6:09 AM
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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.