Skip to content

PSReviewUnusedParameter does not look in scriptblocks #1643

Closed
@chriskuech

Description

@chriskuech

Before submitting a bug report:

  • Make sure you are able to repro it on the latest released version
  • Perform a quick search for existing issues to check if this bug has already been reported

Steps to reproduce

function f {
    Param($param)

    { $param }
}

Expected behavior

No warnings.

Actual behavior

$param has an PSReviewUnusedParameter warning.

Environment data

Name                           Value
----                           -----
PSVersion                      7.1.2
PSEdition                      Core
GitCommitId                    7.1.2
OS                             Linux 5.10.11-v7+ #1399 SMP Thu Jan 28 12:06:05 GMT 2021
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0


1.19.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions