Page MenuHomePhabricator

Add Closure linter to arcanist
ClosedPublic

Authored by vm on May 15 2014, 10:01 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Mar 15, 8:19 PM
Unknown Object (File)
Fri, Mar 1, 7:20 AM
Unknown Object (File)
Feb 5 2024, 3:55 AM
Unknown Object (File)
Feb 5 2024, 3:54 AM
Unknown Object (File)
Feb 5 2024, 3:54 AM
Unknown Object (File)
Feb 5 2024, 3:54 AM
Unknown Object (File)
Feb 5 2024, 3:53 AM
Unknown Object (File)
Feb 4 2024, 3:38 AM
Subscribers

Details

Summary

Found https://secure.phabricator.com/D4519 but it was horribly out of date, so decided to write a new version.
Kinda clobbered together form that diff and the new version of ArcanistJSHintLinter

Test Plan

Tested on personal projects with js files.

Diff Detail

Repository
rARC Arcanist
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

vm retitled this revision from to Add Closure linter to arcanist.
vm updated this object.
vm edited the test plan for this revision. (Show Details)
vm added a reviewer: epriestley.
epriestley edited edge metadata.

Minor inlines, but this looks great. Thanks!

  • This should also include some unit tests.
src/lint/linter/ArcanistClosureLinter.php
31

The regex below hard-codes E:, can this actually emit W: codes?

38–47

Just return 'gjslint', instead of adding new deprecated config options. The bin option in .arclint will let you set this.

70–76

Just remove, flags should cover this now.

This revision now requires changes to proceed.May 15 2014, 11:32 AM
vm edited edge metadata.

Add test case
Also small changes as per comments

epriestley edited edge metadata.

Thanks!

src/lint/linter/__tests__/ArcanistClosureLinterTestCase.php
9

This codebase targets PHP 5.2.3 so we can't use the short array syntax. I'll tweak that.

This revision is now accepted and ready to land.May 15 2014, 4:18 PM
epriestley updated this revision to Diff 21703.

Closed by commit rARC6c6035d04b6c (authored by @vm, committed by @epriestley).