Skip to content

Settings file needs to have a exclude / ignore mechanism #1230

Open
@jhoneill

Description

@jhoneill

**There needs to be an "exclude" option e.g. "exclude .tests.ps1" **

I have a module with ~ 200 pester tests attached. In VSCode if I attach a settings file the analyzer reports each pester command in each file is not found, by default, in each of the profiles where pester is not present. This reports so many false positives it is impossible to see the things which should be fixed. (VS code just says "> 1000 problems" and stops counting!)

Proposed technical implementation details (optional)

An option in the settings file (and perhaps on the command line) which said "exclude files which match this regular expression" would allow a subfolder, or certain names to be ignored. This is preferable to scanning those files, and trying to figure out which messages to hide, or having a mechanism for saying "Tell me if I'm using a module which isn't in V6 ... except don't tell me about Pester ... unless I've used it outside this folder" .

What is the latest version of PSScriptAnalyzer at the point of writing
1.18.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