Page MenuHomePhorge

Fix jshint tests
ClosedPublic

Authored by avivey on Jul 22 2023, 07:42.

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
Branch
master
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 688
Build 688: arc lint + arc unit

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.