Page MenuHomePhabricator

Add a linter rule for `*val` functions
ClosedPublic

Authored by joshuaspence on Nov 25 2015, 7:39 PM.
Tags
None
Referenced Files
F15414654: D14572.id35256.diff
Thu, Mar 20, 1:49 AM
F15414244: D14572.diff
Wed, Mar 19, 11:40 PM
Unknown Object (File)
Feb 3 2025, 7:45 AM
Unknown Object (File)
Jan 29 2025, 10:39 PM
Unknown Object (File)
Jan 29 2025, 10:39 PM
Unknown Object (File)
Jan 29 2025, 10:39 PM
Unknown Object (File)
Jan 29 2025, 10:39 PM
Unknown Object (File)
Jan 29 2025, 10:39 PM
Subscribers

Details

Summary

Type casts should be used instead of calls to the *val functions as function calls impose additional overhead.

Test Plan

Added unit tests.

Diff Detail

Repository
rARC Arcanist
Branch
master
Lint
Lint Passed
Unit
Test Failures
Build Status
Buildable 9124
Build 10762: Run Core Tests
Build 10761: arc lint + arc unit

Event Timeline

joshuaspence retitled this revision from to Add a linter rule for `*val` functions.
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence added a reviewer: epriestley.
epriestley edited edge metadata.

I think "for consistency" is a stronger motivator here than overhead, but rule itself is fine.

This revision is now accepted and ready to land.Nov 28 2015, 2:46 PM
joshuaspence edited edge metadata.

Add another test case

This revision was automatically updated to reflect the committed changes.