hound icon indicating copy to clipboard operation
hound copied to clipboard

Show matches count in results

Open francoisfreitag opened this issue 9 years ago • 3 comments

Displays matches count for each repo and each file in the repo.

francoisfreitag avatar Nov 20 '15 18:11 francoisfreitag

Seems reasonable, @kellegous take a look and merge when ready.

jklein avatar Nov 21 '15 15:11 jklein

Sorry, Haven't been doing my job with these pull requests.

The repo level count is a little different from the file level. It's not sufficient to do result.Matches.length because the Matches array may be shortened due to a range request. You will notice that, by default, hound just returns the first 20 files matched in a repo. You will want to use result.FilesWithMatches instead, which will give you the true number of files that match (not just the ones that were returned).

kellegous avatar Dec 03 '15 14:12 kellegous

FYI, this almost works correctly...there's a small mismatch: http://i.imgur.com/YEn7UfO.png One place says "82 files", and the other one says "81 files".

Here's another example where it is "19 files" in one place but "27 files" in the other: http://i.imgur.com/6SN9aXn.png

egonSchiele avatar Mar 12 '16 05:03 egonSchiele