Page MenuHomePhorge

Fix jshint tests
ClosedPublic

Authored by avivey on Jul 22 2023, 07:42.
Tags
None
Referenced Files
F2327867: D25355.1721882117.diff
Wed, Jul 24, 04:35
F2326799: D25355.1721866020.diff
Wed, Jul 24, 00:07
Unknown Object (File)
Tue, Jul 23, 19:34
Unknown Object (File)
Tue, Jul 23, 12:30
Unknown Object (File)
Mon, Jul 8, 22:21
Unknown Object (File)
Mon, Jul 8, 17:58
Unknown Object (File)
Tue, Jul 2, 22:35
Unknown Object (File)
Sun, Jun 30, 18:55

Details

Summary

The linter's behavior was changed in https://github.com/jshint/jshint/issues/3444: "warnings" are no longer counted for maxerr.

Updating the test to match...

Test Plan

arc unit src/lint/linter/__tests__/ArcanistJSHintLinterTestCase.php with a recent-ish (2.13.6) jshint.

Diff Detail

Repository
rARC Arcanist
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

avivey requested review of this revision.Jul 22 2023, 07:42

Interestingly, I think arc unit didn't find any tests to run... I triggered this explicitly.

How would you describe the syntax of this?

How would you describe the syntax of this?

Everything before the first ~~~~~ line is copied to a new file, and the relevant linter is called on that file.
The stuff after the first ~~~~ line is the expected output (expected lint messages).
If there's a second ~~~~ line, the stuff after it has some more instructions to the linter.

The implementation of this is mostly in https://we.phorge.it/source/arcanist/browse/master/src/lint/linter/__tests__/ArcanistLinterTestCase.php$61.

I honestly still do not understand what is happening here, what does it mean disabled:3:1:E043 or error:3:1:E019 or anything, but:

  1. IT'S AVIVEY \o/ WE TRUST AVIVEY
  2. IT WORKS \o/
$ arc unit src/lint/linter/__tests__/ArcanistJSHintLinterTestCase.php
   PASS  592ms   ArcanistJSHintLinterTestCase::testVersion
   PASS   4.7s   ArcanistJSHintLinterTestCase::testLinter

whatcouldgowrong

This revision is now accepted and ready to land.Aug 3 2023, 09:18
This revision was automatically updated to reflect the committed changes.