Page MenuHomePhabricator

Make very minor generality improvements to the scope selector
ClosedPublic

Authored by epriestley on Apr 25 2019, 10:31 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 11, 10:05 AM
Unknown Object (File)
Thu, Apr 4, 4:05 PM
Unknown Object (File)
Tue, Apr 2, 11:06 PM
Unknown Object (File)
Mon, Apr 1, 4:50 AM
Unknown Object (File)
Mar 19 2024, 3:29 PM
Unknown Object (File)
Mar 19 2024, 3:28 PM
Unknown Object (File)
Mar 19 2024, 3:28 PM
Unknown Object (File)
Mar 19 2024, 3:28 PM
Subscribers
None

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
Lint Not Applicable
Unit
Tests Not Applicable