Page MenuHomePhorge

PhpDoc: Replace non-standard dict type with array
AcceptedPublic

Authored by aklapper on Wed, Jun 4, 07:55.

Details

Reviewers
valerio.bozzolan
Group Reviewers
O1: Blessed Committers
Summary

Make static code analysis more correct (which does not also mean less noisy) by replacing "dict" type in PhpDoc with what they actually are: an array.
The "dict" type is not mentioned in arcanist/src/parser/PhutilTypeSpec.php either, thus no side effects.

See D26059 for the Phorge counterpart.

Test Plan

Grep and read the code, use static code analysis.

Diff Detail

Repository
rARC Arcanist
Branch
phpdocKillListType (branched from master)
Lint
Lint Passed
Unit
Test Failures
Build Status
Buildable 2054
Build 2054: arc lint + arc unit

Unit TestsFailed

TimeTest
855 msArcanistBundleTestCase::testGitRepository
EXCEPTION (Exception): Expected patch and actual patch for 5dec8bf28557f078d1987c4e8cfb53d08310f522 differ. Wrote actual patch to '/var/www/html/phorge/arcanist/src/parser/__tests__/patches//5dec8bf28557f078d1987c4e8cfb53d08310f522.gitpatch.real'. #0 /var/www/html/phorge/arcanist/src/parser/__tests__/ArcanistBundleTestCase.php(87): ArcanistBundleTestCase->runGitRepositoryTests(Object(PhutilDirectoryFixture)) #1 /var/www/html/phorge/arcanist/src/unit/engine/phutil/PhutilTestCase.php(639): ArcanistBundleTestCase->testGitRepository()
124 msArcanistXMLLinterTestCase::testLinter
Lint emitted an unexpected set of messages for file "languages-6.lint-test". MISSING MESSAGES Message with severity "error" at "4:1" (XML5)
87 msAbstractDirectedGraphTestCase::testCyclicGraph
1 assertion(s) passed.
75 msAbstractDirectedGraphTestCase::testEdgeLoadFailure
1 assertion(s) passed.
85 msAbstractDirectedGraphTestCase::testNonTreeGraph
1 assertion(s) passed.
View Full Test Results (2 Failed · 271 Passed · 32 Skipped)

Event Timeline

aklapper requested review of this revision.Wed, Jun 4, 07:55

P.S. why is your local unit test failing?

Cannot reproduce:

arc unit src/parser/__tests__/ArcanistBundleTestCase.php
This revision is now accepted and ready to land.Wed, Jun 4, 10:12

P.S. why is your local unit test failing?

Cannot reproduce:

arc unit src/parser/__tests__/ArcanistBundleTestCase.php

That is a very good question to which I currently have no answer. But it also happens on git master for me so I don't blame my patch for it. :P

diff --git a/image_2.png b/image.png
copy from image_2.png
copy to image.png
index 229920a50597be0644f4b994d213fc7042050289..229920a50597be0644f4b994d213fc7042050289
GIT binary patch
literal 108
zc%17D@N?(olHy`uVBq!ia0y~yU|<1Z4kiW$2DQnYnhXpKk|nMYCBgY=CFO}lsSJ)O
z`AMk?p1FzXsX?iUDV2pMQ*9U+82CJ0978H@B_$}xGO$Q6Fqkkf@+2Od!oa}5;OXk;
Jvd$@?2>`UB82A7H

literal 108
zc%17D@N?(olHy`uVBq!ia0y~yU|<1Z4kiW$2DQnYnhXpKk|nMYCBgY=CFO}lsSJ)O
z`AMk?p1FzXsX?iUDV2pMQ*9U+82CJ0978H@B_$}xGO$Q6Fqkkf@+2Od!oa}5;OXk;
Jvd$@?2>`UB82A7H

diff --git a/image_2.png b/image_2.png
index 229920a50597be0644f4b994d213fc7042050289..69ac76e69fabc49d97339547b91cf748ab703052
GIT binary patch
literal 113
zc%17D@N?(olHy`uVBq!ia0y~yU|<1Z4kiW$2DQnYnhXpKk|nMYCBgY=CFO}lsSJ)O
z`AMk?p1FzXsX?iUDV2pMQ*9U+7=%4t978H@CH*<yz~IB<Qpmu>!(e=ok=^x?;WY*Z
O1_n=8KbLh*2~7Zgh8*nx

literal 108
zc%17D@N?(olHy`uVBq!ia0y~yU|<1Z4kiW$2DQnYnhXpKk|nMYCBgY=CFO}lsSJ)O
z`AMk?p1FzXsX?iUDV2pMQ*9U+82CJ0978H@B_$}xGO$Q6Fqkkf@+2Od!oa}5;OXk;
Jvd$@?2>`UB82A7H

Unrelated troubleshooting but what about this?

LC_ALL=C arc unit src/parser/__tests__/ArcanistBundleTestCase.php

Nah, LC_ALL=C won't change anything. (My system is already in variants of English.)