[Solved] Enforcing naming convention and code commenting practices  

  RSS

0

Hi.

 

Is there any option in PL/SQL Cop to enforce the naming conventions ? for instance that a cursor must be named "c_employees", and so on ?

The same question for code commenting and coding style. Does the tool enforce these guidelines ?

 

Thank you

 
0

Is there any option in PL/SQL Cop to enforce the naming conventions ? for instance that a cursor must be named "c_employees", and so on ?

Not directly. However, since version 2 PL/SQL Cop support custom guidelines. A sample validator is provided as Maven project covering the chapter "2.2 Naming Conventions" of  Trivadis PL/SQL & SQL Coding Guidelines Version 3.2. Have a look at the OTN discussion about this topic. Just configure the validator "com.trivadis.tvdcc.validators.TrivadisGuidelines3Plus" instead of "com.trivadis.tvdcc.validators.GLP" as described in this post. 

The same question for code commenting and coding style. Does the tool enforce these guidelines ?

Currently there are no validators available covering chapter "3. Coding Style".

Awesome Philipp, thanks for your quick reply.

 

Is the "jar" plugin already available anywhere ? or do I have to actually produce it with Maven.

 

All the best

No, you have to build the validators.jar with the Maven build file.

Thanks a lot. With the instructions you provided in this link:

 

https://community.oracle.com/message/14386256#14386256

 

Everything worked as expected.

Cheers

  
Working

Please Login or Register