Project NameCheck standard configuration: Types, Controls, Modules

Project NameCheck configuration

There are three tabs of settings related to the data type of names: Types, Controls and Modules. The Types tab deals with the "As Type" part of variables and functions. The Controls tab deals with VB classic controls. The Modules tab deals with modules, forms, classes and so on. Constants and enums are not affected by the settings described on this page.

Types

The Types tab deals with the "As Type" part of variables, parameters, functions and properties (but not constants or Enums). It includes built-in types such as "Integer" and object types such as "Table". You can also add your own user-defined types like "TPerson" or Enums like "EClassification".

Project NameCheck types configuration

There are some special settings on Types tab. Here are the descriptions of these type settings.

Default (other type)
Variables that have a type but none of the settings on this tab apply to it. You may want to set this to "o" for "object", as unrecognized types are probably objects.
Object (implicit)
Objects with no explicit type. The default data type in VB.NET is Object if you don't give another type.
Variant (implicit)
Variables with no explicit type. The default data type in VB.NET is Variant if you don't give another type.
Default Enum type
The data type is an Enum, and there is no special setting for that Enum name. This setting has no effect on Enum names or Enum constants, only variables, functions etc whose data type is an Enum.
Default Structure record
The data type is a Structure, and there is no special setting for that Structure name. This setting has no effect on Structure names or members of a Structure, only variables, functions etc. whose data type is a Structure. This setting works for VB.NET projects.
Default Type record
The data type is a user-defined Type, and there is no special setting for that Type name. This setting has no effect on Type names or Type fields, only variables, functions etc. whose data type is a Type. This setting works for VB 3-6 projects.

Controls

The Controls tab deals with control names. You can specify standards for TextBox names, CommandButton names etc. A list of common control types is included, but you can add types for 3rd-party controls you use. See the Special tab for an additional setting for variables containing a control. The Controls tab has no meaning in VB.NET projects. In VB.NET, controls are declared as normal class-level variables.

Modules

The Modules tab deals with module names. You can specify standards for the names of Forms, Modules, Classes, .NET Structures, Namespaces, Interfaces etc. These names are special in that there is no scope checking for them. Usually modules are either Friend or Public, although VB.NET allows all scopes for them.

In VB 3-6, you can declare a variable as Form or MDIForm, for example. The settings on this tab affect also the type prefix/suffix of those variables.

The physical file names are not checked by Project NameCheck.

Prefix or suffix?

In most cases you will probably set prefixes for the various types, like "int" for Integer, "txt" for TextBox and "frm" for Form. Suffixes are most likely to come handy if you decide to accept type characters for built-in types: "%" for Integer, "$" for String etc.

Exceptions: Consts and Enums

Constants and enums are exceptional. None of the data type settings have any effect on them. Constants have their own prefix/suffix setting on the Special tab and Enum members have a similar setting on the Scopes tab.

Project NameCheck configuration

© Project Analyzer Help