Rosie is Codiga's Static Code Analyzer.
Rosie works as an API to provide real-time feedback on your code within your IDE or when you push a new revision on your repository.
It is integrated with every element of Codiga's code analysis platform.
Create an AST rule
By writing an AST rule, you accurately check the language element, which reduces the number of false positives.Learn More
Create a pattern rule
A pattern ruleset lets you catch a pattern of code and emits violations/errors. This tutorial explains how to write a Codiga Pattern rule.Learn More
Rosie provides the ability to write custom rules. More importantly, you can write your own rules and share them with your team.
Types of Rules
Rosie supports two types of rules:
- Abstract Syntax Tree (AST): parses the AST of the file under analysis and runs rules that report violations and generate fixed based on a code pattern. Learn more about AST rules for Python.
- Pattern: matches a sequence of code and reports violations based on the pattern content. Learn more about pattern rules.
If you want to write a quick rule, use the pattern rule type. It works like a regular expression and can provide good support for error detection.
If you want to catch more complicated errors, use the AST rule type. It is more complicated than the pattern rule type but it can catch precise code elements.