Alpha0scar
Alpha0scar

Reputation: 300

Cross Referencer for github repositories

I have used the free-electrons elixir cross referencer to browse through the linux source code and be able to jump to the definition and implementation of the defined functions, etc.

I was wondering if there is a similar cross referencer for github repositories

Thanks

Upvotes: 2

Views: 330

Answers (2)

VonC
VonC

Reputation: 1323303

Since June 11th, 2019 (2 years later), you don't need Sourcegraph.

See "Jump to definition in public repositories"

Jump to definition is now available for a subset of public repositories—supported in Go, JavaScript, Python, Ruby, and TypeScript.

Hovering over function and method calls will expose jump-to-definition links for all call sites in the blob content, within the same repository.
We use the recently open-sourced semantic library to find definitions and call sites in your code.

See more at "Navigating code on GitHub":

https://help.github.com/assets/images/help/repository/jump-to-definition-link.png

Tip: Jump to definition works for active branches.
If the feature is enabled for you but you don't see links to the definitions of functions and methods, push to the branch and try again.

See it in action for instance in moby/moby cmd/dockerd/daemon.go.


Starting August 2019, you can "Find all references in public repositories"

Find all references is now available for a subset of public repositories—supported in Go, JavaScript, PHP, Python, Ruby, and TypeScript.
Hovering over function and method names in the code view will expose links to all of the calls to that function or method within the same repository.

https://help.github.com/assets/images/help/repository/find-all-references-tab.png

We use the recently open sourced semantic library to find definitions and call sites in your code: github/semantic

semantic is a Haskell library and command line tool for parsing, analyzing, and comparing source code.

Upvotes: 0

0xtvarun
0xtvarun

Reputation: 698

There is a website that does this, though I am not sure if they index the implementations and declarations like elixir does for linux kernel . Sourcegraph can help you with this.

For example if you wanted to view the linux kernel you would type

https://sourcegraph.com/github.com/torvalds/linux

Upvotes: 2

Related Questions