Page MenuHomePhabricator

Adding php -l linter
ClosedPublic

Authored by bluehawk on Aug 27 2014, 9:15 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jun 21, 9:41 AM
Unknown Object (File)
Wed, Jun 18, 3:49 PM
Unknown Object (File)
Tue, Jun 17, 9:52 AM
Unknown Object (File)
Mon, Jun 16, 11:17 PM
Unknown Object (File)
May 10 2025, 12:19 PM
Unknown Object (File)
May 10 2025, 9:39 AM
Unknown Object (File)
May 9 2025, 11:10 PM
Unknown Object (File)
May 5 2025, 8:46 PM

Details

Summary

Adds a linter that checks php files for syntax errors using php -l

Test Plan

Add a section to your .arclint file similar to:

"php": {
  "type": "php",
  "include": "(\\.php$)"
}

Then run arc lint on a php file with a syntax error.

Diff Detail

Repository
rARC Arcanist
Branch
php-lint
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 2370
Build 2374: [Placeholder Plan] Wait for 30 Seconds

Event Timeline

bluehawk retitled this revision from to Adding php -l linter.
bluehawk updated this object.
bluehawk edited the test plan for this revision. (Show Details)
bluehawk added a reviewer: epriestley.
bluehawk added a subscriber: jacobwalker0814.
epriestley edited edge metadata.

Add a unit test too?

src/lint/linter/ArcanistPhpLinter.php
18

Add punctuation.

34

Add punctuation.

38

Return 'php' instead. Don't introduce deprecated configuration. The "bin" option covers this now.

This revision now requires changes to proceed.Aug 27 2014, 9:20 PM
bluehawk edited edge metadata.

Cleanup, more robust, and adding test

This revision is now accepted and ready to land.Aug 28 2014, 12:29 AM
epriestley updated this revision to Diff 24973.

Closed by commit rARC9fc8a2f61b19 (authored by @bluehawk, committed by @epriestley).