Page MenuHomePhabricator

Add version check whitelists for constants to the version compatibility lint rule
ClosedPublic

Authored by epriestley on Feb 11 2019, 10:25 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 18, 8:36 AM
Unknown Object (File)
Wed, Nov 13, 11:38 PM
Unknown Object (File)
Sat, Nov 9, 10:50 PM
Unknown Object (File)
Wed, Nov 6, 6:03 AM
Unknown Object (File)
Fri, Oct 25, 5:34 PM
Unknown Object (File)
Oct 22 2024, 11:47 PM
Unknown Object (File)
Oct 21 2024, 2:26 AM
Unknown Object (File)
Oct 9 2024, 11:37 AM
Subscribers
None

Details

Summary

Ref T13249. We currently allow if (function_exists('X')) { X(); } but not if (defined('X')) { X; }. Allow the latter.

Test Plan

See D20145, which linted clean with this patch in place.

Diff Detail

Repository
rARC Arcanist
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

src/lint/linter/__tests__/jshint/jshint.lint-test
12

This is unrelated, reflects a behavioral change in newer versions of jshint.

This revision is now accepted and ready to land.Feb 11 2019, 11:18 PM
This revision was automatically updated to reflect the committed changes.