Create Custom Rules With VB Law Administrator
Need rules to match your way of coding?
VB Law Administrator is the VB Law flexible rule editor used to create and maintain
Visual Basic law enforcement rules for an organisation, customer or project. Rules created
by VB Law Administrator are used by VB Law Workstation users and the VB Law Batch Processor to
perform automated code reviews to identify coding violations.
Using VB Law Administrator, rules are defined and grouped within a rulebase. Each rulebase
is saved as a separate file with the extension ".law". Rules are scripted in a Visual Basic for
Applications (VBA) compatible language using the syntax-highlighted condition editor.
Despite having the ability to script complex rules, VB Law Administrator is quick and easy to
use and rules can be added, updated and published quickly. The flexibility of VB Law means
you don't have to change your existing VB coding standards to match the capabilities of the tool.
Beyond Coding Standards
The flexibility of VB Law means that rules can be defined to enforce coding standards
and naming conventions and also to enforce GUI standards, architecture design goals,
unauthorised keywords, authorised components and references.
Need to enforce naming conventions?
VB Law uses type library technology (to map external object type names) and regular
expressions to accommodate even the most complex naming conventions for virtually anything
that can be named in Visual Basic. Tags may be defined for data types, scope levels and controls
to be used in the construction of naming conventions.
Need to enforce GUI standards?
Coding and naming conventions can easily be attached to layout definitions and controls to
interrogate source design time property values (via the parser virtual objects 'Layout'
and 'Control'). VB Law can thus rapidly identify non-standard GUI elements such as incorrect
button sizes, missing accelerator keys, incorrect font size etc. thereby reducing the level
of visual testing required.
Need to enforce architecture design goals?
With software architecture taking an ever more prominent role in software development, coding
standards often need to extend beyond the traditional rules for naming, structure and style to include
additional considerations such as choice of keywords, component versioning, portability, translation,
locale awareness, run-time deployment, compilation options etc.
Need to prevent use of unauthorised keywords?
VB Law uses regular expressions to make it easy to create rules to detect use of unauthorised keywords,
statements or expressions.
Need help with component versioning?
Visual Basic has supported component-based development for many years and the growth of the Internet
has enabled developers to obtain and publish components even more easily. However, unless care is
taken, Visual Basic 6 makes it easy for developers to install and compile against newer versions of
components and then release the newly compiled component to existing users and other developers whilst
forgetting to also supply the newer version of the dependent component. Under such circumstances the
user (and other developers) will likely encounter error "429 - ActiveX component can't create object".
VB Law authorised references and authorised components can help ensure that developers use only
authorised dependencies and that unauthorised versions are identified quickly. The VB Law Administrator
can quickly create a list of authorised references, components and versions per rulebase using drag
and drop functionality.
Previous
Next
|