Page MenuHomePhabricator

Make very minor generality improvements to the scope selector
ClosedPublic

Authored by epriestley on Thu, Apr 25, 10:31 PM.

Details

Reviewers
amckinley
Summary

See PHI985. I think we pretty much need to start applying language-specific rules, but we can apply at least one more relatively language-agnostic rule: don't match lines which are indented 3+ levels.

In C++, we may have symbols like this:

class X {
  public:
    int m() { ... }
}

..but I believe no mainstream language puts symbol definitions 3+ levels deep.

Also clean up some of the tab handling very slightly.

Test Plan

Tests pass, looked at some C++ code and got slightly better (but still not great) matches.

Diff Detail

Repository
rP Phabricator
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.Thu, Apr 25, 10:31 PM
epriestley requested review of this revision.Thu, Apr 25, 10:33 PM
amckinley accepted this revision.Mon, Apr 29, 8:00 PM
This revision is now accepted and ready to land.Mon, Apr 29, 8:00 PM