Page MenuHomePhabricator

Add unit tests for `ArcanistChmodLinter`
ClosedPublic

Authored by joshuaspence on Jan 12 2015, 10:06 AM.
Tags
None
Referenced Files
F14802717: D11343.id.diff
Sat, Jan 25, 2:18 PM
Unknown Object (File)
Thu, Jan 23, 9:25 PM
Unknown Object (File)
Thu, Jan 23, 9:25 PM
Unknown Object (File)
Thu, Jan 23, 9:25 PM
Unknown Object (File)
Thu, Jan 23, 9:25 PM
Unknown Object (File)
Wed, Jan 22, 9:58 AM
Unknown Object (File)
Sun, Jan 19, 11:29 PM
Unknown Object (File)
Sat, Jan 18, 4:54 AM
Subscribers

Details

Summary

Moar test coverage.

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 `ArcanistChmodLinter`.
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence added a reviewer: epriestley.
epriestley edited edge metadata.
This revision is now accepted and ready to land.Jan 14 2015, 2:59 PM
src/lint/linter/ArcanistChmodLinter.php
47

I was considering whether to add an isExecutable() method to ArcanistLintEngine, but decided against it for no particular reason. It could be reasonable to add this method though.

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

Oh, one other thing I noticed is that Filesystem::changePermissions doesn't do any validation on $mode, which seems wrong to me given that PHP will do unexpected things if you pass a string to $mode (see http://php.net/manual/en/function.chmod.php#96086, for example).

This revision was automatically updated to reflect the committed changes.