Partilhar via


Test-MarkdownCommandHelp

Tests the structure of a Markdown help file.

Sintaxe

Item

Test-MarkdownCommandHelp
    [-Path] <string[]>
    [-DetailView]
    [<CommonParameters>]

Literal

Test-MarkdownCommandHelp
    -LiteralPath <string[]>
    [-DetailView]
    [<CommonParameters>]

Description

This command reads a Markdown help file and validates the structure of the help content by checking for the presence of required elements in the proper order. The command returns $true if the file passes validation. The DetailView parameter can be used to display more detailed validation information.

Exemplos

Example 1 - Test a Markdown help file

For this example, we test the structure of a Markdown Module help file. This test fails because the command expects to test a Markdown Command help file. The output shows the kind of information you can expect from the DetailView parameter.

Test-MarkdownCommandHelp .\v2\Microsoft.PowerShell.PlatyPS\Microsoft.PowerShell.PlatyPS.md -DetailView
Test-MarkdownCommandHelp
  Valid: False
  File: D:\Git\PS-Src\platyPS\v2docs\v2\Microsoft.PowerShell.PlatyPS\Microsoft.PowerShell.PlatyPS.md

Messages:
  PASS: First element is a thematic break
  FAIL: SYNOPSIS not found.
  FAIL: SYNTAX not found.
  FAIL: DESCRIPTION not found.
  FAIL: EXAMPLES not found.
  FAIL: PARAMETERS not found.
  FAIL: INPUTS not found.
  FAIL: OUTPUTS not found.
  FAIL: NOTES not found.
  FAIL: RELATED LINKS not found.

Parâmetros

-DetailView

Instructs the command to output detailed validation information.

Propriedades dos parâmetros

Tipo:SwitchParameter
Default value:False
Suporta carateres universais:False
NãoMostrar:False

Conjuntos de parâmetros

(All)
Position:Named
Obrigatório:False
Valor do pipeline:False
Valor do pipeline por nome de propriedade:False
Valor dos restantes argumentos:False

-LiteralPath

Specifies a path to one or more command markdown files. The value of LiteralPath is used exactly as it's typed. No characters are interpreted as wildcards. If the path includes escape characters, enclose it in single quotation marks. Single quotation marks tell PowerShell not to interpret any characters as escape sequences.

For more information, see about_Quoting_Rules.

Propriedades dos parâmetros

Tipo:

String[]

Default value:None
Suporta carateres universais:False
NãoMostrar:False
Aliases:PSPath, LP

Conjuntos de parâmetros

Literal
Position:Named
Obrigatório:True
Valor do pipeline:False
Valor do pipeline por nome de propriedade:True
Valor dos restantes argumentos:False

-Path

The path to the Markdown help file to test.

Propriedades dos parâmetros

Tipo:

String[]

Default value:None
Suporta carateres universais:True
NãoMostrar:False

Conjuntos de parâmetros

Item
Position:0
Obrigatório:True
Valor do pipeline:True
Valor do pipeline por nome de propriedade:True
Valor dos restantes argumentos:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Entradas

String

Saídas

Boolean

Microsoft.PowerShell.PlatyPS.MarkdownCommandHelpValidationResult