Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions bugbug/code_search/searchfox_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,13 @@ def search(commit_hash, symbol_name):
definitions.append(value)

paths = list(set(definition["path"] for definition in definitions))
if len(paths) > 10:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How hard would it be to collect statistics about this? I guess we don't have an infrastructure in place for that, we should build it at some point

logger.warning(
"Too many paths found for symbol %s: %d paths. Skipping this symbol.",
symbol_name,
len(paths),
)
return []

return sum((get_functions(commit_hash, path, symbol_name) for path in paths), [])

Expand Down