inlineGuide

What inline learns

Code graph

The code graph is a map of one repository: every function, class and route in it, and every place each one is called or imported. inline builds it from your default branch and reads it during a review, so it can follow a change to the code that depends on it.

The Code graph card is on a repository's own settings, so rebuilding the index is an admin task. Anyone who can open the repository can open the graph view.

#Where to find it

The code graph belongs to one repository, so you reach it from that repository rather than from the sidebar. Open Repositories, choose a repository, and the Code graph card is on the page. View graph opens the 3D view.

pendral/inline18,402 nodes · 46,915 edges
File 1,204Function 9,881Method 4,006Class 612Interface 488Route 211

Rebuilding index — indexing

Ask the graph

traverses this repo's code-graph index

Ask about the structure of this codebase — answers highlight matching nodes in the graph.

Ask about this codebase…
Searched the graphFound definitionTraced call graphHighlighted in graph
The 3D view, with the node counts, the type filters and the assistant.

#What it maps

The index records the named things in your code and the relationships between them. Each node is a file, function, method, class, interface, enum, type, module or route, and each edge is a call, an import or a reference.

The card shows the size of the current index, as a count of nodes, edges and files, along with the branch and commit it was built from.

#How it gets built

inline rebuilds the index on every push to the default branch, so it tracks the code your team has merged. Rebuild starts one by hand, which is what you want on a repository you enabled a moment ago.

A build runs through Starting build environment, Cloning repository, Indexing code graph, Computing layout and Storing artifact, and the card shows which phase it is in while it works.

#What it changes about a review

A review of a pull request resolves the branch against the nearest indexed commit, and inline gains four ways to ask about your code:

What inline can askWhat it gets back
Where is this symbol definedThe file and lines, looked up in the index.
What calls this symbolReal call sites, so a renamed import or a re-export is included and a similarly-named identifier is not.
What imports this fileEvery file that depends on it, which is the blast radius of changing it.
What does this call reachThe call graph out from a symbol, or the callers in toward it.

So a review can tell you that a signature change left three call sites behind, and name them. Reviews of a repository with no index yet work from live code search instead, and the card says so.

#Ask the graph

The graph view has an assistant called Ask the graph, which answers questions about the structure of the codebase by walking the same index. Ask it what calls a function or what a module depends on, and the nodes it found light up in the view.

It is the fastest way to answer "what would this change touch" on a codebase you are new to, without opening a file.

#Exploring the view

The chips along the top count the nodes of each type and switch them on and off, so you can drop the files and look only at the call graph. Hovering a node shows its name, its type, how many connections it has and the file it is in.

Code graph is included with Pro. See Plans and billing.