“Much more than grep” – Visual Studio Magazine


GitHub preview improved code search: “Much more than grep”

GitHub invites developers to participate in a Technology Preview of Enhanced Code Finder, which it describes as “much more than grep”, the Linux command-line search utility.

The project has its own website and temporary interface separate from GitHub.com, although functionality can be integrated into IDEs and code editors later, with GitHub asking developers what tools would be good candidates for integration.

One aspect of the project is improving the search syntax, which differs from the usual GitHub.com search syntax with the introduction of new operators for searching for regular expressions and symbols.

GitHub code lookup
[Click on image for larger view.] GitHub code lookup (source: GitHub).

In these early stages, the project’s search index covers over 5 million popular public code repositories, including private repositories that a user has access to. The initial list of programming languages ​​in which symbol extraction is supported (more to add) includes C #, Python, Go, Java, JavaScript, TypeScript, PHP, Protocol Buffers, Ruby, and Rust.

Code display
[Click on image for larger view.] Code display (source: GitHub).

Features highlighted by the Microsoft-owned development platform include:

  • Easily find what you’re looking for among the top results, with smart ranking and a code-optimized index.
  • Search for an exact string, with support for substring matches and special characters, or use regular expressions (included in / separators).
  • Expand your searches with org: Where repo: qualifiers, with autocomplete suggestions in the search box.
  • Refine your results using filters like language:, path:, extension: and Boolean operators (OR, NOT). Find the definitions of a symbol with symbol:.
  • Get your bearings quickly with additional features, such as a directory tree, symbol information for the active oscilloscope, jump to definition, select to search, and more!

Access to the Tech Preview is limited, and developers can request to be put on the waitlist here.

Going forward, GitHub plans to experiment with rating and ranking heuristics to find the best approach, explore the APIs and integrations most likely to have an impact, and add support for more languages ​​to specific features. to the tongue.

“For Code Research, our vision is to help every developer find, discover, navigate and understand code quickly and intuitively,” the company said. “GitHub Code Finder puts the world’s code at your fingertips – it’s all searchable. It helps you maintain a state of flux by showing you the most relevant results first and helping you with auto-completion every step of the way. And once you get there. a results page, rich browsing experience is optimized for reading and understanding code, allowing you to quickly understand unfamiliar logic, even for code outside of your IDE. ”

About the Author

David Ramel is editor and writer for Converge360.

About Jon Moses

Check Also

NSA, CISA say: don’t block PowerShell, here’s what to do instead

Image: Getty Images/iStockphoto Cybersecurity authorities in the United States, United Kingdom, and New Zealand have …