Toad World® Forums

Coding Standards Enforcement

Is there a way to configure TOAD to enforce certain formatting and coding standards to help a group of developers to write code consistent SQL. Can you link me to the correct documentation?

Not sure about "enforcing" coding standards, but there two ways that Toad can make coding more consistent:

  1. Via the Formatting Rules (bring up the Options base in Toad, and note that you can save/load a formatting rules file that you wish to share with your colleagues).

  2. Via Code Analysis rules. If you have Professional Edition or above, and you're brave enough, you can start adding some of your own Code Analysis rules to flag any deviations from best-practice formatting, object naming conventions, etc. The Code Analysis engine can flag errant code as it's being typed in the Editor, or invoked in batch to assess some/all procedural code on the database. Select Database->Diagnose->Code Analysis and click on one of the tool bar buttons to get the master rules list. You'll need to know some XPATH grammar here.

While neither of the above methods will "enforce" your standards automatically, it's only a push of a button to format code, or to flag code that doesn't meet certain criteria.