Overview
Extract relevant information about how code is used across the entire codebase.
Background
The traditional review process falls short in capturing these implicit impacts, which can lead to undetected bugs and issues in the codebase Git diff for, instance, shows the lines of code that have been modified, but they do not provide insights into how these changes might affect other parts of the codebase that were not directly modified. For example:
Indirect Dependencies: Changes in one function might impact other functions or modules that depend on it, even though those dependencies are not immediately visible in a simple diff.
Global State: Modifications to global variables or shared state can have far-reaching effects that are not captured by examining the changed lines alone.
Inheritance and Polymorphism: In object-oriented programming, changes to a base class or interface can impact all derived classes or implementations
Code Graph
The graph is designed to analyze code changes, extract relevant information, and provide insights into the codebase. This module processes files, extracts code elements, and generates insights to help developers understand the impact of their changes.
Parsers
Parsers are responsible for interpreting and transforming raw code and log data into structured representations. They break down the source code or log files into meaningful components that can be further analyzed.
Responsibilities:
Syntax Analysis: Parse the code into its syntactic elements, such as functions, classes, variables, and statements.
Log Parsing: Interpret log files to extract relevant information about errors, stack traces, and runtime events.
Error Stack Deserialization: Convert raw stack trace strings into structured error stack objects, identifying the programming language and extracting code references.
Indexers
Indexers organize and catalog the parsed data to make it easily searchable and accessible. They create indices that map code elements to their locations and relationships within the codebase.
Responsibilities:
File Indexing: Index files by their structure and content, creating references for functions, classes, and other code elements.
AST Indexing: Build indices from ASTs to track the relationships and dependencies between different parts of the code.
Dependency Mapping: Map dependencies between modules, classes, and functions to understand how changes in one part of the code might affect others.
Enrichers
Enrichers enhance the indexed data with additional context and insights. They analyze the indexed data to generate meaningful information that aids in understanding the impact of code changes.
Responsibilities:
Impact Analysis: Analyze the indexed data to determine how changes in the code affect other parts of the codebase.
Code Change Insights: Generate insights about code changes, such as identifying potentially affected areas and suggesting relevant discussions or actions.
Error Correlation: Correlate errors from runtime logs with specific lines and functions in the code, providing context for debugging.
Last updated