Page MenuHomePhabricator

Codesearch should have a non-test filter
Closed, ResolvedPublic

Description

It would be nice to be able to exclude test files from search results. It probably just takes a well-crafted filename filter (e.g. .*/tests/.*Test.php), but it would be convenient to have it as a preset somewhere.

Event Timeline

CommunityTechBot renamed this task from tkaaaaaaaa to Codesearch should have a non-test filter.Jul 2 2018, 8:57 AM
CommunityTechBot raised the priority of this task from High to Needs Triage.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot added a subscriber: Aklapper.

Note that there's no requirement for the regex to match the full path. "test" suffices to exclude all directories and files pertaining to QUnit (tests/qunit/foo.test.js) or PHPUnit (tests/phpunit/FooTest.php). Alternatively you can use Test.php if you believe there's a chance of over-excluding files that contain the word "test" in lowercase for some other reason.

Krinkle moved this task from Index requests to Backlog on the VPS-project-Codesearch board.

Change #1306099 had a related patch set uploaded (by Simon04; author: Simon04):

[labs/codesearch@master] Add file path suggestions for non-test filtering

https://gerrit.wikimedia.org/r/1306099

Change #1306099 merged by jenkins-bot:

[labs/codesearch@master] frontend: Add datalist suggestions to the file path filters

https://gerrit.wikimedia.org/r/1306099

Krinkle assigned this task to simon04.

Deployed.