Quote:
Originally Posted by euhlmann
Or use an actual database engine's full text search, which should be far more efficient.
Btw, when I tried searching for usages of WPILib classes with my mongo/node implementation, I found more than a few top results being the source for that WPILib class, since it seems many teams like to keep entire copies of WPILib in their repos. I wonder if there's a way to filter those out.
|
You could probably hash every file, and store them indexed by hash. Then each teams code is just a list of paths mapped to hashes. When you do a search, it could show each of the places where the file is used.
If you wanted to be super fancy, you could split by subroutine, and hash those (excluding whitespace).