Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for PowerShell #387

Open
lipkau opened this issue Sep 8, 2015 · 0 comments
Open

Support for PowerShell #387

lipkau opened this issue Sep 8, 2015 · 0 comments

Comments

@lipkau
Copy link

lipkau commented Sep 8, 2015

Hi there.

I tried playing around and add PowerShell to the supported languages, but I ended up failed (with my limited python knowledge).
Would it be able to add PowerShell to this repo? I am not sure, as the syntax is quite different (example bellow).
Maybe you could give me some pointers and tips, so that I can add this functionality myself.

Here is an example:

function Set-Foo
{
    <#
        .SYNOPSIS
            Lorem ipsum

        .DESCRIPTION
            Lorem ipsum dolor sit amet

        .INPUTS
            string
            int
            bool

        .OUTPUTS
            bool

        .EXAMPLE
            c:\> Set-Foo "Hello World"
            ---------
            Example 1

        .EXAMPLE
            c:\> Set-Foo "Hello World" 10
            ---------
            Example 2
    #>
    [CmdletBinding()]
    [OutputType([bool])] #Can be an array of possible return types OutputType([bool],[int])
    param
    (
        [Parameter(Mandatory = $true, ValueFromPipeline = $true)]
        [string]$InputObject,

        [int]$number,

        [switch]$boolValue
    )

    #do some stuff
    if ($ok) return $true
    else {return $false}
}

I am currently using a snippet as DocBlock. However, it would be nice if some stuff (.INPUTS and .OUTPUTS) could be populated automatically.

I appreciate any help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant