Page MenuHomePhorge

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

Authored by Sten on Sep 27 2023, 09:11.
Tags
None
Referenced Files
F2688488: D25442.1734724068.diff
Thu, Dec 19, 19:47
F2688487: D25442.1734724067.diff
Thu, Dec 19, 19:47
F2688486: D25442.1734724067.diff
Thu, Dec 19, 19:47
F2688485: D25442.1734724065.diff
Thu, Dec 19, 19:47
F2688481: D25442.1734723861.diff
Thu, Dec 19, 19:44
F2688478: D25442.1734723824.diff
Thu, Dec 19, 19:43
F2682771: D25442.1734671339.diff
Thu, Dec 19, 05:09
F2682677: D25442.1734667696.diff
Thu, Dec 19, 04:08

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