PowerShell / PowerShell/PSScriptAnalyzer

Support for function "wrappers"

Open
#410 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area - Configuration Issue - Enhancement
Dominant language
C#
Stars
2.2k
Forks
414
Avg merge
13h 1m
Merged PRs (30d)
2

Description

It would be cool if PSScriptAnalyzer had a way to support different "function keywords". For example when using PSake to create build files the build tasks are captured in a special kind of function like this:

Task Compile -Depends Clean {
   "Compile"
 }

The problem lies in the fact that the Compile "Task"/function is not checked by PSScriptAnalyzer. Maybe a possible solution would be to offer users a way to register other "function keywords" (like "Task" in the example).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by examining how PSScriptAnalyzer identifies standard function keywords and how PSake's Task Compile -Depends Clean {} form is parsed. The work would be complete when users can register alternate function keywords such as Task and PSScriptAnalyzer analyzes those wrapped functions.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.