Open source projects, such as those resulting from Google’s regular summer of code events, have had a common home on the “Google Open Source ” portal since 2017 . This is a recommendable and extensive platform for everyone who wants to deal with modern open source projects.
To facilitate the handling of the overwhelming amount of code that is accessible via the platform, Google has put a flexible search function, namely the code search , as a bracket.
The code search works in full text mode and reveals all snippets that match or come close to the snippet you entered. It looks like this, for example:
In addition to the comprehensive code search for all projects, the platform has a project subdivision. Each project is given its own homepage. From this start page you can then search specifically for code and files in this one project. This is what the homepage for the Angular project looks like:
Nevertheless, we cannot really call the flexible code search from Google the “Google for code” because the function is limited, quasi curated.
The Sourcegraph code search engine , on the other hand, is really open , with which snippets of almost any project can be found anywhere.
In addition to full-text search, Sourcegraph supports advanced search queries. So you can search with regular expressions. Sourcegraph provides a query builder for sophisticated searches. You can use the to narrow down the search if the standard method gives you too many results.
One of the two tools should be usable for every application. It’s best to put them directly in your developer toolbox.