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)
Fri, Apr 5, 10:05 PM
Unknown Object (File)
Wed, Apr 3, 12:00 PM
Unknown Object (File)
Wed, Apr 3, 11:59 AM
Unknown Object (File)
Wed, Apr 3, 11:59 AM
Unknown Object (File)
Wed, Apr 3, 11:59 AM
Unknown Object (File)
Mar 4 2024, 9:12 PM
Unknown Object (File)
Feb 14 2024, 12:37 PM
Unknown Object (File)
Jan 13 2024, 6:47 PM
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.