Skip to content

Ability to skip forward class declarations. #9

Description

@mibli

Currently searching especially in large code bases can make the fccf process a lot of files.

Use case: User wants to search for a class Bunny in the code.
Execution: fccf -C Bunny
Expected behavior:

// ./Animals/Fun/Bunny.cpp (Line: 24 to 29)
struct Bunny {
  bool plushy;
  Color eyeColor;
  Color furColor;
}

Actual Behavior:

// ./Animals/Predators/Wolf.cpp (Line: 20 to 20)
class Bunny

// ./Farm/Fur/BunnyFarm.cpp (Line: 20 to 20)
class Bunny

... etc

It would be nice to have -C skip forward declarations, or have an option to skip them. If there's such an option I haven't found it. Not only it would help get user what he wants, but it would reduce search times significantly.
On a large code base (~3mln LoC) that optimizes with forward class declarations, looking up a class can take up to 10 minutes. If these wouldn't be matched, it would take up to few seconds.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions