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)
Sun, Feb 9, 7:10 AM
Unknown Object (File)
Sun, Feb 9, 7:10 AM
Unknown Object (File)
Sun, Feb 9, 7:10 AM
Unknown Object (File)
Sun, Feb 2, 4:52 AM
Unknown Object (File)
Tue, Jan 28, 8:35 PM
Unknown Object (File)
Sun, Jan 26, 7:50 PM
Unknown Object (File)
Sun, Jan 26, 7:50 PM
Unknown Object (File)
Sun, Jan 26, 7:50 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.