Page MenuHomePhabricator

[LINTER] Check for missing explicit
ClosedPublic

Authored by Fabien on Jun 12 2020, 16:02.

Details

Reviewers
deadalnix
Group Reviewers
Restricted Project
Commits
rABC0edc1fe896af: [LINTER] Check for missing explicit
Summary

Fix the remaining missing explicit occurrences and add a linter to
prevent introducing new ones.
The linter uses cppcheck, which is natively supported by arcanist.
However we need some more output filtering so I redefined another linter
class inpired by their work.

Test Plan
arc lint --everything
ninja all check-all

Event Timeline

Fabien requested review of this revision.Jun 12 2020, 16:02
deadalnix added a subscriber: deadalnix.

Separating the explicit from the linter would have been preferable, but this is low enough so that we can live with it.

arcanist/linter/CppCheckLinter.php
148 ↗(On Diff #21326)

The old classic variation on the if return else pattern :)

This revision is now accepted and ready to land.Jun 12 2020, 16:33

TBH I didn't expect so much changes when I started !

arcanist/linter/CppCheckLinter.php
148 ↗(On Diff #21326)

Whoups, it's a shameless copy/paste...

This revision was automatically updated to reflect the committed changes.
jasonbcox added inline comments.
CONTRIBUTING.md
134 ↗(On Diff #21332)

Note that when you add new dev dependencies that affect linting, they need to be added to the base image setup script as well.