Page MenuHomePhabricator

Add unit tests for `ArcanistFilenameLinter`
ClosedPublic

Authored by joshuaspence on Jan 12 2015, 8:06 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jan 2, 4:33 AM
Unknown Object (File)
Tue, Dec 31, 10:28 PM
Unknown Object (File)
Sat, Dec 28, 3:59 PM
Unknown Object (File)
Wed, Dec 25, 7:14 AM
Unknown Object (File)
Tue, Dec 24, 2:45 AM
Unknown Object (File)
Tue, Dec 17, 6:49 AM
Unknown Object (File)
Tue, Dec 17, 5:42 AM
Unknown Object (File)
Nov 29 2024, 4:21 PM
Subscribers

Details

Summary

Self-explanatory.

Test Plan

arc unit

Diff Detail

Repository
rARC Arcanist
Branch
master
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 3789
Build 3801: [Placeholder Plan] Wait for 30 Seconds

Event Timeline

joshuaspence retitled this revision from to Add unit tests for `ArcanistFilenameLinter`.
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence added a reviewer: epriestley.
epriestley edited edge metadata.

See inline.

src/lint/linter/__tests__/ArcanistLinterTestCase.php
211

I don't think this is right? $pos will alway be a scalar, and this will always cast it into array($pos) and always discard character information.

$ php -r 'list($a, $b) = explode(":", "1:2:3"); $b = (array)$b; print_r($b);'
Array
(
    [0] => 2
)
This revision now requires changes to proceed.Jan 12 2015, 4:06 PM

The code would work as written if list($a, $b) unpacked the first argument into $a and all remaining arguments into $b, but list() does not do that. Maybe that was the thinking?

The code would work as written if list($a, $b) unpacked the first argument into $a and all remaining arguments into $b, but list() does not do that. Maybe that was the thinking?

Yeah, for some reason I thought that PHP was a sane language.

joshuaspence edited edge metadata.

Learn how PHP works

epriestley edited edge metadata.
This revision is now accepted and ready to land.Jan 12 2015, 7:46 PM
This revision was automatically updated to reflect the committed changes.