Skip to content

New-ModuleManifest formatting issues #27633

Description

@TrisBits

Summary of the new feature / enhancement

Summary

New-ModuleManifest generates .psd1 output with formatting that triggers PSScriptAnalyzer violations.

Steps to Reproduce

New-ModuleManifest -Path .\test.psd1 -FunctionsToExport 'FunctionA','FunctionB','FunctionC'
Invoke-ScriptAnalyzer -Path .\test.psd1 -IncludeRule PSAvoidTrailingWhitespace,PSUseConsistentIndentation

Actual Output

FunctionsToExport = 'FunctionA', 'FunctionB', 
               'FunctionC'

Expected Output

FunctionsToExport = 'FunctionA', 'FunctionB',
    'FunctionC'

Issues

  1. Trailing whitespace is emitted on wrapped array lines (PSAvoidTrailingWhitespace).
  2. Continuation lines are column-aligned instead of consistently indented (PSUseConsistentIndentation).

Impact

Consumers must post-process generated manifests to satisfy standard PSScriptAnalyzer formatting rules.

Proposed technical implementation details (optional)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Enhancementthe issue is more of a feature request than a bugNeeds-TriageThe issue is new and needs to be triaged by a work group.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions