Page MenuHomePhorge

Update ArcanistComposerLinter.php to check content-hash instead of hash
ClosedPublic

Authored by Sten on Sep 27 2023, 09:11.

Details

Summary

The 'hash' key in composer.json files was removed by composer version 1.3.0 in December 2016, in favour of the 'content-hash' key.

Update the code to validate the content-hash instead.

Fixes T15647

Test Plan
  • Update a composer.json file, without running 'composer update'
  • Run 'arc lint' and confirm it warns you that the composer.lock file is out of date
  • Run 'composer update'
  • Run 'arc lint' and confirm it returns OKAY

Diff Detail

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

Unit TestsFailed

TimeTest
270 msArcanistPhpcsLinterTestCase::testLinter
Lint emitted an unexpected set of messages for file "basics.lint-test". MISSING MESSAGES Message with severity "error" at "2:1"
12 msArcanistChmodLinterTestCase::testLinter
5 assertion(s) passed.
0 msArcanistClosureLinterTestCase::testVersion
1 assertion(s) passed.
0 msArcanistCpplintLinterTestCase::testVersion
1 assertion(s) passed.
11 msArcanistFilenameLinterTestCase::testLinter
5 assertion(s) passed.
View Full Test Results (1 Failed · 23 Passed · 29 Skipped)

Event Timeline

Sten requested review of this revision.Sep 27 2023, 09:11
Sten planned changes to this revision.Sep 27 2023, 09:12

Lint & fix xml unit test

This revision is now accepted and ready to land.Sep 27 2023, 20:21