Table of Contents

Interface IValidateBuild

Namespace
Invex.Atom.Build
Assembly
Invex.Atom.Build.dll

Defines a target responsible for validating the Atom build configuration.

public interface IValidateBuild : IReportsHelper, IBuildAccessor
Inherited Members

Remarks

The primary purpose of IValidateBuild is to enhance the reliability and maintainability of Atom build scripts by catching common configuration mistakes early in the process.

Properties

ValidateBuild

Gets the build target that performs validation checks on the Atom build.

Target ValidateBuild { get; }

Property Value

Target

Examples

This target is included in BuildDefinition and is automatically available if the build inherits from that type. Otherwise, it can be manually included:

public class Build : BuildDefinition
{
    // ... other targets ...
    // The ValidateBuild target from IValidateBuild would be automatically available
    // and could be set as a dependency for other targets.
    Target MyCustomTarget => t => t
        .DependsOn(nameof(IValidateBuild.ValidateBuild)) // ValidateBuild is the property from IValidateBuild
        .Executes(() => { /* Do something after validation */ });
}

The target can then be run with

atom ValidateBuild

Remarks

Errors: a target consumes an artifact or variable that the named target does not produce, or two parameters share the same argument name. Warnings: a target has no description, or has neither tasks nor dependencies.

Exceptions

StepFailedException

Thrown if any validation error is found.