Run convention checks against the resolved module.
Routes to the engine matching the module's ecosystem:
- bicep -> first-party layout, version, changelog, test-source, compiled ARM, checked-in JSON, workflow, and CODEOWNERS checks
- terraform -> built-in AVM convention rules
The ecosystem is determined by Get-AvmModuleContext, which honours the .avm/context.psd1 override file and the -Ecosystem filter. Bicep workflow checks require powershell-yaml 0.4.12, loaded only when a module workflow is inspected. Install it separately with Install-PSResource; missing or invalid YAML fails the check. Bicep rules run in process as the packaged Pester suite under Resources/bicep/conventions, so Pester 5.5.0 or later must be installed. A rule that throws is reported as an error issue.
Routed by the dispatcher: 'avm check convention'.
avm check convention
Invoke-AvmCheckConvention [[-Path] <string>] [-Ecosystem <string>] [-AllowPathFallback] [-Fix] [-FixableOnly] [-SkipModuleVersionCheck] [<CommonParameters>]When set, accept a PATH-resolved tool binary that self-reports the lock-pinned version.
| Property | Value |
|---|---|
| Type | Switch |
| Required | false |
| Position | named |
| Default value | False |
| Accept pipeline input | false |
| Accept wildcard characters | false |
Force the ecosystem selector. Defaults to 'auto'.
| Property | Value |
|---|---|
| Type | String |
| Required | false |
| Position | named |
| Default value | auto |
| Accept pipeline input | false |
| Accept wildcard characters | false |
When set, rule primitives that declare a fix path apply it (e.g. renaming output.tf to outputs.tf, appending missing globs to .gitignore). Without -Fix the verb is check-only.
| Property | Value |
|---|---|
| Type | Switch |
| Required | false |
| Position | named |
| Default value | False |
| Accept pipeline input | false |
| Accept wildcard characters | false |
Evaluate only rules that declare a deterministic fix. Pre-commit uses this with -Fix; standalone checks and pr-check evaluate every rule.
| Property | Value |
|---|---|
| Type | Switch |
| Required | false |
| Position | named |
| Default value | False |
| Accept pipeline input | false |
| Accept wildcard characters | false |
Working directory whose enclosing module to check. Defaults to the current location.
| Property | Value |
|---|---|
| Type | String |
| Required | false |
| Position | 1 |
| Default value | $PWD.Path |
| Accept pipeline input | false |
| Accept wildcard characters | false |
Skip the PowerShell Gallery check that otherwise stops the command when a newer Avm.Authoring version is available. Writes a warning once.
| Property | Value |
|---|---|
| Type | Switch |
| Required | false |
| Position | named |
| Default value | False |
| Accept pipeline input | false |
| Accept wildcard characters | false |
avm check conventionInvoke-AvmCheckConvention -Path C:\repos\my-tf-module -Ecosystem terraformpscustomobject from the engine: Engine, Tool, ToolPath, ToolSource, Status, Issues.