-
Notifications
You must be signed in to change notification settings - Fork 32
Linter
Built in is a VB6 linter. While not necessary, it is somewhat recommended.
Linting the code will help you spot issues that may slow down your conversion. Many do not matter a whole lot, such as line indent, whether you have the variable on the Next
of a For ... Next
loop.
In general, the code converter should run without it, but some rules, such as the WITH
handling, are often better handled in the native code, rather than letting these things migrate to C# and trying to introduce a temp variable name "on the fly".
If you want to configure the linter, you can configure individual rules in the file modLinter.LintAbbr()
, and follow the instructions in the comment there. Ultimately, if the function return ""
, the rule is ignored.
The preferred way to use the linter is from the Immediate window.
To manually lint a file, in the Immediate window from the converter project, type:
?LintFile("C:\path\to\yourfile.frm")
This will output lint messages only to a message box. To output results to the Immediate Window, try
?LintFile("C:\path\to\yourfile.frm", ".")
To lint an entire folder, type:
?LintFolder("C:\Your\Folder\Path")
Additionally, you can lint individual types with:
?LintModules
?LintForms
?LintClasses
Be sure to Configure your project first. Even when running from the Immediate Window, the configuration should be respected.