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
F13084362: D20146.diff
Wed, Apr 24, 10:56 PM
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
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
Branch
lint2
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 21931
Build 29949: Run Core Tests
Build 29948: arc lint + arc unit

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.