powershell/PSUseToExportFieldsInManifest is a PSScriptAnalyzer diagnostic emitted by tally for PowerShell snippets embedded in Dockerfiles.
tally disables this rule by default because Dockerfiles do not ship PowerShell module
manifests (
.psd1 files) — this rule targets module-authoring artifacts that are out of
scope for container builds. Re-enable it with
include = ["powershell/PSUseToExportFieldsInManifest"] or by setting
rules.powershell.PSUseToExportFieldsInManifest.severity = "warning" in .tally.toml.Description
To improve the performance of module auto-discovery, module manifests should not use wildcards ('*') or null ($null) in the following entries:
AliasesToExportCmdletsToExportFunctionsToExportVariablesToExport
How
Use an explicit list in the entries.Example 1
Suppose there are no functions in your module to export. Then,Problematic code
Correct code
Example 2
Suppose there are only two functions in your module,Get-Foo and Set-Foo that you want to
export. Then,