VI Analyzer Configuration File

From LabVIEW Wiki
(Redirected from Cfg file)
Jump to: navigation, search

The VI Analyzer Configuration File contains the configuration and settings for a VI Analyzer Task, including the list of items to analyze, the tests to perform, and test configurations. It can be created manually, from the Analyze VIs command, or programmatically with the LabVIEW VI Analyzer Toolkit add-on.

File format

VI Analyzer supports two configuration file formats. The legacy format (.cfg), and the XML-based format (.viancfg).

Legacy format (.cfg)

The legacy configuration file format is a proprietary binary format that was used until VI Analyzer 2017. In VI Analyzer 2018 and later, legacy configuration files can still be loaded but are read-only and can only be saved in the XML-based format.

XML-based format (.viancfg)

The XML-based configuration file format was first introduced in VI Analyzer 2018 and provides the same functionality as the legacy format while being easier to maintain and compare in a version control system.

Example (comments added for explanation)

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<Config>
	<FileFormatVersion>1</FileFormatVersion>
	<AnalyzeProject>FALSE</AnalyzeProject><!-- Indicates whether the configuration file applies to the project specified in <ProjectPath /> (TRUE) or only the items listed under <ItemsToAnalyze /> (FALSE). -->
	<ProjectPath>""</ProjectPath>
	<TargetIndex>0</TargetIndex><!-- Index of the project target in the project specified in <ProjectPath /> -->
	<ItemsToAnalyze>
		<Item>
			<Path></Path><!-- Absolute or relative path to an item, LLB, or folder. -->
			<Removed>FALSE</Removed><!-- Indicates whether <Path /> is removed from the analysis. -->
		</Item>
	</ItemsToAnalyze>
	<TestConfigData>
		<Test>
			<Name>"Arrays and Strings in Loops"</Name>
			<Ranking>0</Ranking>
			<MaxFailures>5</MaxFailures><!-- Maximum number of failures to detect in an item. The analyzer skips searching when the maximum number is reached and moves on to the next test. -->
			<BasePath>"LabVIEW"</BasePath><!-- Base path for <RelativePath />. This can be an absolute path or a symbolic path. -->
			<RelativePath>"project\\_VI Analyzer\\_tests\\Block Diagram\\Performance\\Arrays and Strings in Loops.llb"</RelativePath><!-- Relative path starting from <BasePath />. -->
			<Selected>TRUE</Selected><!-- Indicates whether the test is enabled or disabled. -->
			<Controls><!-- List of additional properties for the test. Available options depend on the kind of test. -->
				<Control>
					<Name>"Functions"</Name>
					<Type>"Int"</Type>
					<Value>1</Value>
				</Control>
			</Controls>
		</Test>
	</TestConfigData>
	<ExclusionData>
		<Item>
			<Path></Path><!-- Path to the item that the exclusion applies. -->
			<ExcludedTests>"Arrays and Strings in Loops"</ExcludedTests>
		</Item>
	</ExclusionData>
</Config>

See also

External links