Tutorials

Create Pattern Rules

BackNext

9. Add the error with the fix

Finally, we add the violation to the list of violations being reported using the function addError

1addError(error.addFix(fix));

Let's go!

Start interacting with the tutorial!

my-new-rule.js

Codiga Logo
Codiga Hub
  • Rulesets
  • Playground
  • Snippets
  • Cookbooks
soc-2 icon

We are SOC-2 Compliance Certified

G2 high performer medal

Codiga – All rights reserved 2022.