Important Announcement

This forum will be discontinued.

The creation of new topics is disabled.

Please open GitHub issues for the corresponding topics/products in the following Trivadis repositories:

A lot of users have already a GitHub account and the management of the issues is better than in this forum. For example, closing a forum topic is never related to a product change. Closing a GitHub issue for an accepted bug means that the bug is fixed. This should simplify the work for all involved parties.

See this blog post for more information.

Thank you for your understanding.

Notifications
Clear all

[Solved] Custom Validator - How to Override Checks and other Questions

1 Posts
2 Users
0 Reactions
1,429 Views
0
Topic starter

As descussed here:

https://github.com/Trivadis/plsql-and-sql-coding-guidelines/issues/78

I want to write my own validator based on the TrivadisGuidelines3Plus.xtend.

In my case I want to override the G-1050 but I'm really struggling because first of all I don't know what the method is called to override. I was guessing "checkGuideline1050" because some with other numbers exist. But 1050 doesnt.

Basically I want something like:

@Check
override checkGuideline1050(FunctionHeading f){
    if(NOT f.function.startsWith('logger')){
        super.checkGuideline1050(f);
    }
}
 
Could you please give me guidance on how to approach this?
 
My second question is regarding the license. It says no commercial use (and I read the CC details regarding NonC) but it's still unclear for me.
Does that mean we can't use it in a company or does it just mean to not sell e.g. custom vaidators?
1 Answer
0

I've opened a GitHub issue for the first part of the question and will answer it there.

My second question is regarding the license. It says no commercial use (and I read the CC details regarding NonC) but it's still unclear for me.
Does that mean we can't use it in a company or does it just mean to not sell e.g. custom vaidators?
You have not licensed PL/SQL Cop. Hence you may use just the preview/trial version. This version has some limitations regarding time and volume. Additionally, you must not use the product for commercial purposes in any way. This means for example that you must not check production code other than for preview/trial purposes. The same is true for the validators.
 
Please note that you can use the SQL Developer extension to check also production code. But only based on the code within an editor window and with the default validator which covers the Trivadis Guidelines without the naming conventions. If you configure other validators within SQL Developer then the restrictions mentioned above apply.
 
I hope this makes it clearer.