Page MenuHomePhabricator

Add a linter rule for `*val` functions
ClosedPublic

Authored by joshuaspence on Nov 25 2015, 7:39 PM.
Tags
None
Referenced Files
F13294199: D14572.id35313.diff
Wed, Jun 5, 4:18 PM
F13294198: D14572.id35256.diff
Wed, Jun 5, 4:18 PM
F13294197: D14572.id.diff
Wed, Jun 5, 4:18 PM
F13294196: D14572.diff
Wed, Jun 5, 4:17 PM
F13266972: D14572.diff
Tue, May 28, 10:55 PM
F13266063: D14572.id35256.diff
Tue, May 28, 8:45 AM
F13255969: D14572.id35314.diff
Sat, May 25, 9:14 AM
F13248016: D14572.id35256.diff
Fri, May 24, 12:26 AM
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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.