build/validateManifests.ps1

param(
    [string] $directory,
    [bool] $recursive
)

$manifests  = Get-ChildItem -Path $directory -Filter *.psd1 -Recurse:$recursive

foreach($manifest in $manifests){
    Write-Output "Validating $($manifest.FullName)"
    Test-ModuleManifest -path $manifest.FullName | Out-Null
}