How to use Code Search

How to use Code Search

Code Search is officially defined as “a public code search tool for exploring code without downloading the source.” To search for code, open the Code Search UI for your project. Supported Code Search products include Android, Chromium and Google Open Source.

Searches use RE2 regular expressions by default. Enclose your search in double quotation marks ( ” ) if regular expressions are not needed.


Android Code Search, Screen Capture/Code Search

Cross-references can be used with Code Search to explore connections between symbols in the code base:

“Where configured, cross references are supplied by kythe. To determine if a particular repository has cross references configured, look at the cross-references column on the project page. If there is a checkmark, there are cross-references for at least one language in that repository. Note that not all repositories with checkmarks have cross-references for the same set of languages.”

Code Search user guide further expands on how to use search filters, operators and additional tasks.

The syntax reference section of Code Search contains detailed information on the supported filters, language options, operators, syntax options, and keyboard shortcuts

See also  How to Instantly Search on DuckDuckGo from the Context Menu