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)
Oct 20 2024, 10:12 AM
Unknown Object (File)
Oct 19 2024, 3:35 AM
Unknown Object (File)
Oct 18 2024, 5:37 PM
Unknown Object (File)
Oct 18 2024, 5:51 AM
Unknown Object (File)
Oct 16 2024, 1:31 PM
Unknown Object (File)
Oct 14 2024, 3:04 PM
Unknown Object (File)
Oct 12 2024, 9:12 AM
Unknown Object (File)
Oct 3 2024, 3:18 AM
Subscribers

Details

Summary

Self-explanatory.

Test Plan

arc unit

Diff Detail

Repository
rARC Arcanist
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.