[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Introducing codesearch.debian.net, a regexp code search engine



On Wed, 07 Nov 2012 21:56:17 +0100
Michael Stapelberg <stapelberg@debian.org> wrote:

> Neil Williams <codehelp@debian.org> writes:
> > That's just swamped by licences, as would be received and lots of other
> > common words (which are, rightly or wrongly, used as variable names or
> > as part of function names).
> Well, of course searching for common words will result in a lot of
> results. Asking the other way around: What is your expected result for
> something like "modify", even if comments were ignored?

function names and variables which contain the word modify...

bytes_received could be a very common variable, but it could also be
bytesReceived or received_bytes depending on the convention. It's just
the kind of thing to search for buffer overflows....

My own initial query was QofBook.

http://codesearch.debian.net/search?q=QofBook+filetype%3Ac
http://codesearch.debian.net/search?q=QofBook+filetype%3Ac+package%3Aqof

Any variable/class which is used as a base struct/class across a library
or which is contained within a lot of other structs in a library is
going to come up again and again in documentation comments and in
class/struct definitions.

> > http://codesearch.debian.net/search?q=codehelp+filetype%3Aperl
> >
> > filetype:perl just doesn't seem to be working:
> > http://codesearch.debian.net/search?q=QofBook+filetype%3Aperl
> > ... lists a lot of .c files ...
> >
> > filetype:python does the same - some .py but then a lot more .c
> Thanks, this is fixed now.

Now it's missing known hits:

http://codesearch.debian.net/search?skip=17&q=noauth+filetype%3Aperl
Should find listings in multistrap, which this search finds:

http://codesearch.debian.net/search?q=noauth+package%3Amultistrap

Just because a file doesn't end in .pl, doesn't mean it isn't perl -
Policy mandates that perl in /usr/bin does not end in .pl Is this only
finding perl modules and perl scripts in /usr/share?

That's a bigger problem than the extra listings for comments.

e.g. http://codesearch.debian.net/search?q=codehelp+filetype%3Aperl

Now lists lots of .pm and .pl files but nothing else. dpkg-cross is
listed as a .pm but not as the executable dpkg-cross. wrap-lintian.pl
is listed but not multistrap. Grip.pm is listed but not emgrip.

-- 


Neil Williams
=============
http://www.linux.codehelp.co.uk/

Attachment: pgpVXAcazyoFy.pgp
Description: PGP signature


Reply to: