Sourcegraph
Sourcegraph is a code search and code intelligence tool that semantically indexes and analyzes large codebases so that they can be searched across commercial, open-source, local, and cloud-based repositories.[1] Sourcegraph supports all major programming languages.[2]
![]() | |
Developer(s) | Sourcegraph, Inc. |
---|---|
Initial release | 2013 |
Stable release | 5.2.0
/ 3 October 2023 |
Repository | https://github.com/sourcegraph/sourcegraph |
Written in | Go, TypeScript |
Operating system | Microsoft Windows, Linux, MacOS |
Type | Software intelligence |
License | Proprietary |
Website | about |
History
Sourcegraph was developed by Stanford graduates Quinn Slack and Beyang Liu and was first released in 2013.[3][4] Partly inspired by Liu's experience using Google Code Search while he was a Google intern,[5] Sourcegraph was designed to "tackle the big code problem" by enabling developers to manage large codebases that span multiple repositories, programming languages, file formats, and projects.[6]
Sourcegraph can be used to search and analyze all of an organization's code.[4] During search indexing, the platform builds a global reference graph, that maps an entire codebase and enables functionality such as "go to definition".[7]
Sourcegraph software was initially self-hosted by each customer on their own infrastructure.[8] Early customers included Uber, Dropbox, and Lyft.[8][9]
In 2016, Sourcegraph was criticized[10] for being provided with a Fair Source License with the developers explaining[11][12][5] that "all of Sourcegraph’s source code is publicly available and hackable"[13] and was intended to "help open sourcers strike a balance between getting paid and preserving their values".[14] In 2018, Sourcegraph was licensed under the Apache License 2.0,[15][16] and Sourcegraph OSS has since been released under the Apache License 2.0. The commercial version, Sourcegraph Enterprise, has been released under its own license.[17] In 2023, Sourcegraph was criticized[18] for dropping the Apache license for most of its code, leaving it public but only available under its Enterprise license.[19]
In 2019, Sourcegraph was integrated into the GitLab codebase, giving GitLab users access to a browser-based developer platform.[20]
In 2021, a browser-based portal became available, allowing users to browse open-source projects and personal private code for free.[8] In 2022, Sourcegraph Cloud, a commercial single-tenant cloud solution for organizations with more than 100 developers, was launched.[21][8]
Applications
In research, Sourcegraph has been used to develop data mining methods for downstream dependencies[22] and to assist in refactoring and translating a program into its equivalent in another programming language.[23]
Sourcegraph is used in the CERN Accelerator Control software community to index, quickly search, and generate statistics on code.[24]
In cybersecurity, Sourcegraph has been used to gain better insight into source code during penetration testing.[25]
As of July 2021, Sourcegraph customers include Adidas, Lyft, Uber, Yelp,[26] Plaid, GE, Atlassian,[27] Amazon, PayPal, Qualtrics, and Cloudflare.[6]
Core features
Code can be searched and navigated through the Sourcegraph web interface or through browser and IDE extensions and text editor plugins.[1] Sourcegraph supports over 30 programming languages and integrates with GitHub and GitLab for code hosting, Codecov for code coverage, and Jira Software for project management.[26]
Code Search
Sourcegraph's "universal code search" tool is used to search, explore, and understand code.[3][28] The search can be implemented across multiple repositories and code hosting platforms. Searches can be literal, regular expression, or structural. The structural search syntax is language-aware and handles nested expressions and multi-line statements better than regular expressions.[1] Sourcegraph's Code Search uses a variant of Google's PageRank algorithm to rank results by relevance.[29]
Code Navigation
Sourcegraph's Code Navigation feature can be used to jump to the definition of a variable or function, or find all references to it in a codebase.[1]
Batch Changes
Sourcegraph's Batch Changes feature enables developers and companies to automate and track large-scale code refactoring, security fixes, and migrations across repositories and code hosts.[30]
Code Insights
Sourcegraph's Code Insights feature extracts data from a codebase to provide detailed analytics and visualizations to track the health and progress of a code project.[31]
Ownership
The software is developed by a company of the same name and has raised a total of nearly $225 million in funding to date.
See also
References
- Hoyt, Ben (2020-08-17). "Searching code with Sourcegraph". LWN.net. Retrieved 2022-10-03.
- Slack, Quinn (2019-02-08). "Announcing Sourcegraph 3.0". Sourcegraph official website. Retrieved 2022-11-18.
- Sawers, Paul (2020-03-03). "Sourcegraph raises $23 million to bring universal code search to all developers". VentureBeat. Retrieved 2022-11-18.
- Salter, Jim (2020-10-01). "Sourcegraph: Devs are managing 100x more code now than they did in 2010". Ars Technica. Retrieved 2022-11-18.
- Adam Stacoviak (2016-08-16). "Sourcegraph the 'Google for Code'". Changelog (Podcast). Retrieved 2022-11-21.
- Sawers, Paul (2020-12-03). "Sourcegraph raises $50 million to tackle 'big code' problems with universal search". VentureBeat. Retrieved 2022-11-21.
- Ramji, Sam (2022-12-22). "Google That Code: How Sourcegraph Simplifies Development". The New Stack. Retrieved 2023-02-20.
- Sawers, Paul (2021-08-19). "Sourcegraph plans to index the entire open source web". VentureBeat. Retrieved 2022-10-03.
- Slack, Quinn (2022-09-27). "Sourcegraph Cloud: secure, scalable, dedicated instances for enterprises". Sourcegraph Blog. Retrieved 2022-11-21.
- Asay, Matt (2016-04-01). "Fair Source licensing is the worst thing to happen to open source-definitely maybe". TechRepublic. Archived from the original on 2021-11-07. Retrieved 2022-11-21.
- Eghbal, Nadia (2016). Roads and bridges. The Unseen labor behind our digital infrastructure (PDF) (Report). pp. 94–95. Retrieved 2022-12-14.
- "Fair Source License". Fair Source License official website. Retrieved 2022-11-21.
- "The Sourcegraph developer release: A better way to discover and understand code". Sourcegraph Blog. 2016-05-30. Retrieved 2022-11-21.
- Finley, Klint (2016-03-29). "One Startup's Heretical Plan to Turn Open Source Code Into Cash". Wired. Retrieved 2022-11-21.
- Schmidt, Julia (2018-10-02). "Sourcegraph pulls back the curtain, becomes open source project". DevClass. Retrieved 2022-11-21.
- Steve Krouse (2019-10-24). "Basic Developer Human Rights: Quinn Slack". Future of Coding (Podcast). Retrieved 2022-11-21.
- "Licensing". Sourcegraph Handbook. Retrieved 2022-11-21.
- "Seriously, don't sign a CLA". drewdevault.com. Retrieved 2023-07-05.
- "relicense all paths other than MIT licensed code, client/cody*, jetbr… · sourcegraph/sourcegraph@3cd931e". GitHub. Retrieved 2023-07-05.
- "Native code intelligence is coming to GitLab". GitLab. Retrieved 2022-10-03.
- Slack, Quinn (2022-08-27). "Sourcegraph Cloud: secure, scalable, dedicated instances for enterprises". Sourcegraph. Retrieved 2022-12-05.
- Thiede, Christoph; Limberger, Daniel; Scheibel, Willy; Döllner, Jürgen (2022), "Augmenting Library Development by Mining Usage Data from Downstream Dependencies", 17th International Conference on Evaluation of Novel Approaches to Software Engineering, ENASE
- Haavisto, Juuso (2020). Leveraging APL and SPIR-V languages to write network functions to be deployed on Vulkan compatible GPUs (MSc). Université de Lorraine. Retrieved 2022-12-15.
- Voirin, R.; Vanden Eynden, M.; Oulevey, T. (2022). "The State of Containerization in CERN Accelerator Controls". JACoW. ICALEPCS (2021): 829–834. doi:10.18429/JACoW-ICALEPCS2021-THBL03. Retrieved 2022-12-15.
- Rehberger, Johann (2020). Cybersecurity Attacks – Red Team Strategies: A practical guide to building a penetration testing program having homefield advantage. Packt Publishing Ltd. pp. 216–224. ISBN 9781838825508.
- "Q&A: Sourcegraph's Universal Code Search Tool". IEEE Spectrum. 2020-04-03. Retrieved 2022-10-03.
- Miller, Ron (2021-07-13). "Sourcegraph raises $125M Series D on $2.6B valuation for universal code search tool". TechCrunch. Retrieved 2022-10-03.
- Liu, Beyang (2020-01-15). "Sourcegraph: Universal code search and intelligence". InfoWorld. Retrieved 2022-12-05.
- Yegge, Steve (2022-11-08). "Rethinking search results ranking on Sourcegraph.com". Sourcegraph. Retrieved 2022-12-06.
- "Sourcegraph Batch Changes Offers Automation for Large-Scale Code Changes". Database Trends and Applications. 2021-03-24. Retrieved 2023-02-08.
- Sawers, Paul (2022-03-10). "With Code Insights, Sourcegraph gives developers a better understanding of their codebase". VentureBeat. Retrieved 2022-10-03.