Static code analysis
Overview - Static Code Analysis 💎¶
By combining static code analysis with LLM capabilities, Qodo Merge can provide a comprehensive analysis of the PR code changes on a component level.
It scans the PR code changes, finds all the code components (methods, functions, classes) that changed, and enables to interactively generate tests, docs, code suggestions and similar code search for each component.
Language that are currently supported:
Python, Java, C++, JavaScript, TypeScript, C#.
Capabilities¶
Analyze PR¶
The analyze
tool enables to interactively generate tests, docs, code suggestions and similar code search for each component that changed in the PR.
It can be invoked manually by commenting on any PR:
An example result:
Clicking on each checkbox will trigger the relevant tool for the selected component.
Generate Tests¶
The test
tool generate tests for a selected component, based on the PR code changes.
It can be invoked manually by commenting on any PR:
analyze
tool.
Generate Docs for a Component¶
The add_docs
tool scans the PR code changes, and automatically generate docstrings for any code components that changed in the PR.
It can be invoked manually by commenting on any PR:
Or be triggered interactively by using the analyze
tool.
Generate Code Suggestions for a Component¶
The improve_component
tool generates code suggestions for a specific code component that changed in the PR.
It can be invoked manually by commenting on any PR:
Or be triggered interactively by using the analyze
tool.
Find Similar Code¶
The similar code
tool retrieves the most similar code components from inside the organization's codebase, or from open-source code.
For example:
Global Search
for a method called chat_completion
: