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 Warnings
SeverityLocationCodeMessage
Warningsrc/lint/linter/ArcanistComposerLinter.php:90XHP9Naming Conventions
Warningsrc/lint/linter/ArcanistComposerLinter.php:92XHP9Naming Conventions
Warningsrc/lint/linter/ArcanistComposerLinter.php:94XHP9Naming Conventions
Warningsrc/lint/linter/ArcanistComposerLinter.php:108XHP9Naming Conventions
Warningsrc/lint/linter/ArcanistComposerLinter.php:110XHP9Naming Conventions
Warningsrc/lint/linter/ArcanistComposerLinter.php:111XHP9Naming Conventions
Warningsrc/lint/linter/ArcanistComposerLinter.php:114XHP9Naming Conventions
Warningsrc/lint/linter/ArcanistComposerLinter.php:117XHP9Naming Conventions
Warningsrc/lint/linter/ArcanistComposerLinter.php:119XHP9Naming Conventions
Unit
Test Failures
Build Status
Buildable 851
Build 851: arc lint + arc unit

Unit TestsFailed

TimeTest
268 msArcanistPhpcsLinterTestCase::testLinter
Lint emitted an unexpected set of messages for file "basics.lint-test". MISSING MESSAGES Message with severity "error" at "2:1"
17 msArcanistXMLLinterTestCase::testLinter
Lint emitted an unexpected set of messages for file "languages-6.lint-test". MISSING MESSAGES Message with severity "error" at "3:16" (XML76)
10 msArcanistChmodLinterTestCase::testLinter
5 assertion(s) passed.
0 msArcanistClosureLinterTestCase::testVersion
1 assertion(s) passed.
0 msArcanistCpplintLinterTestCase::testVersion
1 assertion(s) passed.
View Full Test Results (2 Failed · 22 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