You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Grab yourself a copy of linux (I was working on the given commit)
mkdir linux &&cd linux && git init
git remote add origin https://github.com/torvalds/linux.git
git fetch --depth 1 origin 89f5e14d05b4852db5ecdf222dc6a13edc633658
git checkout FETCH_HEAD
# Run ag searching for a certain fadvise.sh
ag -l -u -Q foo .| grep fadvise.sh
You will notice that this spits out
tools/perf/trace/beauty/fadvise.sh
Searching with grep, however, shows that there is no mention of foo within fadvise.sh.
grep foo tools/perf/trace/beauty/fadvise.sh
yields nothing.
System Details
ag --version
ag version 2.2.0
Features:
+jit +lzma +zlib
uname -a
Linux fedora 6.10.10-200.fc40.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Sep 12 18:26:09 UTC 2024 x86_64 GNU/Linux
Name : the_silver_searcher
Version : 2.2.0^2020704.5a1c8d8
Release : 8.fc40
Architecture : x86_64
Size : 122 k
Source : the_silver_searcher-2.2.0^2020704.5a1c8d8-8.fc40.src.rpm
Repository : @System
From repo : fedora
Summary : Super-fast text searching tool (ag)
URL : https://github.com/ggreer/the_silver_searcher
License : ASL 2.0 and BSD
Description : The Silver Searcher is a code searching tool similar to ack,
: with a focus on speed.
Current Progress
I have not performed any investigation where this unexpected result may be coming from.
The text was updated successfully, but these errors were encountered:
And actually, as a matter of fact, the number of false positives is significantly larger than that singular file. I'm attaching a list of false positives. false_positives.log
The same strategy as described in the main issue body can be employed to confirm these are in fact false positives
cat false_positives.log | xargs grep foo
yields nothing.
The false positive rate is 844/99138 (where 99138 comes from find -type f | wc -l) which is about 0.85%.
Try the search directly, and the issue should be clear:
$ ag foo tools/perf/trace/beauty/fadvise.sh
# reliably process on arch FOO a perf.data file collected by 'perf trace
ag uses "smart case" by default, where case insensitive search is automatically enabled in some cases (e.g., when the pattern does not contain any uppercase characters). -s will disable it:
I've noticed that
ag
yields a false positive.Reproduction Guide
You will notice that this spits out
Searching with grep, however, shows that there is no mention of
foo
withinfadvise.sh
.yields nothing.
System Details
ag --version
uname -a
cat /etc/os-release
dnf info the_silver_searcher
Current Progress
I have not performed any investigation where this unexpected result may be coming from.
The text was updated successfully, but these errors were encountered: