5. Do not analyze if this is a test file
First, we will pass the analysis if the file is a test file. We will skip the analysis if the file starts with test_ or ends with _test.py.
Therefore, we add the following code at the beginning of the visit function.
1if (filename.includes("_test.py") || filename.includes("test_")) {
2 return;
3}
Let's go!
Start interacting with the tutorial!
my-new-rule.js