Get Started
In this tutorial, you will learn how to create pattern rules. A pattern ruleset lets you catch a pattern of code and emits violations/errors.
Objectives
You are going to write an analysis rule that
- Detects assert foo and replaces with assert bar
- Pass any check on a test file
To make a rule, we need to go through the following steps:
- Create a ruleset
- Create a rule
- Write the rule
- Add some tests
All the code in the rules is written in
JavaScriptThis is a pattern rule for
PythonClick next at the top for a walkthrough step by step.