Reputation: 31
I was learning about SQLFluff and how to lint using it. While linting, it used only the default rules for checking. But our product need different customised rules for linting. So, I planned to write a custom rule in SQLFluff.
I was trying to find how a custom rule is written. But was not able find it. I need the step wise procedure to write a custom rule in SQLFluff.
Upvotes: 3
Views: 1812
Reputation: 2604
You can find a thorough explanation of the various function methods to develop custom rules here.
The text can be dense. So to look at examples, you can look directly at the code for the build-in rules themselves. Clicking on the capitalisation/
directory, you can see the different rules on capitalisation CP{01,02,03,04,05}
.
Upvotes: 0