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.

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
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

epriestley created this revision.Feb 11 2019, 10:25 PM
epriestley added inline comments.Feb 11 2019, 10:26 PM
src/lint/linter/__tests__/jshint/jshint.lint-test
12

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

epriestley requested review of this revision.Feb 11 2019, 10:26 PM
amckinley accepted this revision.Feb 11 2019, 11:18 PM
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.