Skip to main content
powershell/PSAvoidMultipleTypeAttributes is a PSScriptAnalyzer diagnostic emitted by tally for PowerShell snippets embedded in Dockerfiles.

Description

Parameters should not have more than one type specifier. Multiple type specifiers on parameters can cause runtime errors.

How

Ensure each parameter has only 1 type specifier.

Examples

Problematic code

Correct code

Source

This rule documentation is adapted from Microsoft’s PSScriptAnalyzer documentation for AvoidMultipleTypeAttributes, licensed under CC BY 4.0.