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.Play Tutorial
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.Play Tutorial
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.
Codiga provides a playground to experiment our statistic analyzer and write your own rules. Use the playground to test your own rules, experiment by starting from other people rules and let your imagination write the best code analysis rules.Learn More
Explore the Hub
The Codiga Hub hosted hundreds of custom analysis rules you can reuse. Browse rules on the Hub, import them in the playground and create new analysis rules for your team.Learn More