diff --git a/Tests/Documentation/RuleDocumentation.tests.ps1 b/Tests/Documentation/RuleDocumentation.tests.ps1 index f08d9689e..a62c8506e 100644 --- a/Tests/Documentation/RuleDocumentation.tests.ps1 +++ b/Tests/Documentation/RuleDocumentation.tests.ps1 @@ -1,6 +1,6 @@ Describe "Validate rule documentation files" { BeforeAll { - $ruleDocDirectory = Join-Path $PSScriptRoot '../../RuleDocumentation' + $ruleDocDirectory = Join-Path $PSScriptRoot '../../docs/Rules' $docs = Get-ChildItem $ruleDocDirectory/*.md -Exclude README.md | ForEach-Object { "PS" + $_.BaseName} | Sort-Object diff --git a/build.psm1 b/build.psm1 index 4a18c68b5..8bc052f9e 100644 --- a/build.psm1 +++ b/build.psm1 @@ -102,7 +102,7 @@ function Remove-Build function Start-DocumentationBuild { $docsPath = Join-Path $projectRoot docs - $markdownDocsPath = Join-Path $docsPath markdown + $markdownDocsPath = Join-Path $docsPath Cmdlets $outputDocsPath = Join-Path $script:destinationDir en-US $platyPS = Get-Module -ListAvailable platyPS if ($null -eq $platyPS -or ($platyPS | Sort-Object Version -Descending | Select-Object -First 1).Version -lt [version]0.12) diff --git a/docs/markdown/Get-ScriptAnalyzerRule.md b/docs/Cmdlets/Get-ScriptAnalyzerRule.md similarity index 100% rename from docs/markdown/Get-ScriptAnalyzerRule.md rename to docs/Cmdlets/Get-ScriptAnalyzerRule.md diff --git a/docs/markdown/Invoke-Formatter.md b/docs/Cmdlets/Invoke-Formatter.md similarity index 100% rename from docs/markdown/Invoke-Formatter.md rename to docs/Cmdlets/Invoke-Formatter.md diff --git a/docs/markdown/Invoke-ScriptAnalyzer.md b/docs/Cmdlets/Invoke-ScriptAnalyzer.md similarity index 100% rename from docs/markdown/Invoke-ScriptAnalyzer.md rename to docs/Cmdlets/Invoke-ScriptAnalyzer.md diff --git a/RuleDocumentation/AlignAssignmentStatement.md b/docs/Rules/AlignAssignmentStatement.md similarity index 100% rename from RuleDocumentation/AlignAssignmentStatement.md rename to docs/Rules/AlignAssignmentStatement.md diff --git a/RuleDocumentation/AvoidAssignmentToAutomaticVariable.md b/docs/Rules/AvoidAssignmentToAutomaticVariable.md similarity index 100% rename from RuleDocumentation/AvoidAssignmentToAutomaticVariable.md rename to docs/Rules/AvoidAssignmentToAutomaticVariable.md diff --git a/RuleDocumentation/AvoidDefaultValueForMandatoryParameter.md b/docs/Rules/AvoidDefaultValueForMandatoryParameter.md similarity index 100% rename from RuleDocumentation/AvoidDefaultValueForMandatoryParameter.md rename to docs/Rules/AvoidDefaultValueForMandatoryParameter.md diff --git a/RuleDocumentation/AvoidDefaultValueSwitchParameter.md b/docs/Rules/AvoidDefaultValueSwitchParameter.md similarity index 100% rename from RuleDocumentation/AvoidDefaultValueSwitchParameter.md rename to docs/Rules/AvoidDefaultValueSwitchParameter.md diff --git a/RuleDocumentation/AvoidGlobalAliases.md b/docs/Rules/AvoidGlobalAliases.md similarity index 100% rename from RuleDocumentation/AvoidGlobalAliases.md rename to docs/Rules/AvoidGlobalAliases.md diff --git a/RuleDocumentation/AvoidGlobalFunctions.md b/docs/Rules/AvoidGlobalFunctions.md similarity index 100% rename from RuleDocumentation/AvoidGlobalFunctions.md rename to docs/Rules/AvoidGlobalFunctions.md diff --git a/RuleDocumentation/AvoidGlobalVars.md b/docs/Rules/AvoidGlobalVars.md similarity index 100% rename from RuleDocumentation/AvoidGlobalVars.md rename to docs/Rules/AvoidGlobalVars.md diff --git a/RuleDocumentation/AvoidInvokingEmptyMembers.md b/docs/Rules/AvoidInvokingEmptyMembers.md similarity index 100% rename from RuleDocumentation/AvoidInvokingEmptyMembers.md rename to docs/Rules/AvoidInvokingEmptyMembers.md diff --git a/RuleDocumentation/AvoidLongLines.md b/docs/Rules/AvoidLongLines.md similarity index 100% rename from RuleDocumentation/AvoidLongLines.md rename to docs/Rules/AvoidLongLines.md diff --git a/RuleDocumentation/AvoidMultipleTypeAttributes.md b/docs/Rules/AvoidMultipleTypeAttributes.md similarity index 100% rename from RuleDocumentation/AvoidMultipleTypeAttributes.md rename to docs/Rules/AvoidMultipleTypeAttributes.md diff --git a/RuleDocumentation/AvoidNullOrEmptyHelpMessageAttribute.md b/docs/Rules/AvoidNullOrEmptyHelpMessageAttribute.md similarity index 100% rename from RuleDocumentation/AvoidNullOrEmptyHelpMessageAttribute.md rename to docs/Rules/AvoidNullOrEmptyHelpMessageAttribute.md diff --git a/RuleDocumentation/AvoidOverwritingBuiltInCmdlets.md b/docs/Rules/AvoidOverwritingBuiltInCmdlets.md similarity index 100% rename from RuleDocumentation/AvoidOverwritingBuiltInCmdlets.md rename to docs/Rules/AvoidOverwritingBuiltInCmdlets.md diff --git a/RuleDocumentation/AvoidShouldContinueWithoutForce.md b/docs/Rules/AvoidShouldContinueWithoutForce.md similarity index 100% rename from RuleDocumentation/AvoidShouldContinueWithoutForce.md rename to docs/Rules/AvoidShouldContinueWithoutForce.md diff --git a/RuleDocumentation/AvoidTrailingWhitespace.md b/docs/Rules/AvoidTrailingWhitespace.md similarity index 100% rename from RuleDocumentation/AvoidTrailingWhitespace.md rename to docs/Rules/AvoidTrailingWhitespace.md diff --git a/RuleDocumentation/AvoidUsingCmdletAliases.md b/docs/Rules/AvoidUsingCmdletAliases.md similarity index 100% rename from RuleDocumentation/AvoidUsingCmdletAliases.md rename to docs/Rules/AvoidUsingCmdletAliases.md diff --git a/RuleDocumentation/AvoidUsingComputerNameHardcoded.md b/docs/Rules/AvoidUsingComputerNameHardcoded.md similarity index 100% rename from RuleDocumentation/AvoidUsingComputerNameHardcoded.md rename to docs/Rules/AvoidUsingComputerNameHardcoded.md diff --git a/RuleDocumentation/AvoidUsingConvertToSecureStringWithPlainText.md b/docs/Rules/AvoidUsingConvertToSecureStringWithPlainText.md similarity index 100% rename from RuleDocumentation/AvoidUsingConvertToSecureStringWithPlainText.md rename to docs/Rules/AvoidUsingConvertToSecureStringWithPlainText.md diff --git a/RuleDocumentation/AvoidUsingDeprecatedManifestFields.md b/docs/Rules/AvoidUsingDeprecatedManifestFields.md similarity index 100% rename from RuleDocumentation/AvoidUsingDeprecatedManifestFields.md rename to docs/Rules/AvoidUsingDeprecatedManifestFields.md diff --git a/RuleDocumentation/AvoidUsingDoubleQuotesForConstantString.md b/docs/Rules/AvoidUsingDoubleQuotesForConstantString.md similarity index 100% rename from RuleDocumentation/AvoidUsingDoubleQuotesForConstantString.md rename to docs/Rules/AvoidUsingDoubleQuotesForConstantString.md diff --git a/RuleDocumentation/AvoidUsingEmptyCatchBlock.md b/docs/Rules/AvoidUsingEmptyCatchBlock.md similarity index 100% rename from RuleDocumentation/AvoidUsingEmptyCatchBlock.md rename to docs/Rules/AvoidUsingEmptyCatchBlock.md diff --git a/RuleDocumentation/AvoidUsingInvokeExpression.md b/docs/Rules/AvoidUsingInvokeExpression.md similarity index 100% rename from RuleDocumentation/AvoidUsingInvokeExpression.md rename to docs/Rules/AvoidUsingInvokeExpression.md diff --git a/RuleDocumentation/AvoidUsingPlainTextForPassword.md b/docs/Rules/AvoidUsingPlainTextForPassword.md similarity index 100% rename from RuleDocumentation/AvoidUsingPlainTextForPassword.md rename to docs/Rules/AvoidUsingPlainTextForPassword.md diff --git a/RuleDocumentation/AvoidUsingPositionalParameters.md b/docs/Rules/AvoidUsingPositionalParameters.md similarity index 100% rename from RuleDocumentation/AvoidUsingPositionalParameters.md rename to docs/Rules/AvoidUsingPositionalParameters.md diff --git a/RuleDocumentation/AvoidUsingUsernameAndPasswordParams.md b/docs/Rules/AvoidUsingUsernameAndPasswordParams.md similarity index 100% rename from RuleDocumentation/AvoidUsingUsernameAndPasswordParams.md rename to docs/Rules/AvoidUsingUsernameAndPasswordParams.md diff --git a/RuleDocumentation/AvoidUsingWMICmdlet.md b/docs/Rules/AvoidUsingWMICmdlet.md similarity index 100% rename from RuleDocumentation/AvoidUsingWMICmdlet.md rename to docs/Rules/AvoidUsingWMICmdlet.md diff --git a/RuleDocumentation/AvoidUsingWriteHost.md b/docs/Rules/AvoidUsingWriteHost.md similarity index 100% rename from RuleDocumentation/AvoidUsingWriteHost.md rename to docs/Rules/AvoidUsingWriteHost.md diff --git a/RuleDocumentation/DSCDscExamplesPresent.md b/docs/Rules/DSCDscExamplesPresent.md similarity index 100% rename from RuleDocumentation/DSCDscExamplesPresent.md rename to docs/Rules/DSCDscExamplesPresent.md diff --git a/RuleDocumentation/DSCDscTestsPresent.md b/docs/Rules/DSCDscTestsPresent.md similarity index 100% rename from RuleDocumentation/DSCDscTestsPresent.md rename to docs/Rules/DSCDscTestsPresent.md diff --git a/RuleDocumentation/DSCReturnCorrectTypesForDSCFunctions.md b/docs/Rules/DSCReturnCorrectTypesForDSCFunctions.md similarity index 100% rename from RuleDocumentation/DSCReturnCorrectTypesForDSCFunctions.md rename to docs/Rules/DSCReturnCorrectTypesForDSCFunctions.md diff --git a/RuleDocumentation/DSCStandardDSCFunctionsInResource.md b/docs/Rules/DSCStandardDSCFunctionsInResource.md similarity index 100% rename from RuleDocumentation/DSCStandardDSCFunctionsInResource.md rename to docs/Rules/DSCStandardDSCFunctionsInResource.md diff --git a/RuleDocumentation/DSCUseIdenticalMandatoryParametersForDSC.md b/docs/Rules/DSCUseIdenticalMandatoryParametersForDSC.md similarity index 100% rename from RuleDocumentation/DSCUseIdenticalMandatoryParametersForDSC.md rename to docs/Rules/DSCUseIdenticalMandatoryParametersForDSC.md diff --git a/RuleDocumentation/DSCUseIdenticalParametersForDSC.md b/docs/Rules/DSCUseIdenticalParametersForDSC.md similarity index 100% rename from RuleDocumentation/DSCUseIdenticalParametersForDSC.md rename to docs/Rules/DSCUseIdenticalParametersForDSC.md diff --git a/RuleDocumentation/DSCUseVerboseMessageInDSCResource.md b/docs/Rules/DSCUseVerboseMessageInDSCResource.md similarity index 100% rename from RuleDocumentation/DSCUseVerboseMessageInDSCResource.md rename to docs/Rules/DSCUseVerboseMessageInDSCResource.md diff --git a/RuleDocumentation/MisleadingBacktick.md b/docs/Rules/MisleadingBacktick.md similarity index 100% rename from RuleDocumentation/MisleadingBacktick.md rename to docs/Rules/MisleadingBacktick.md diff --git a/RuleDocumentation/MissingModuleManifestField.md b/docs/Rules/MissingModuleManifestField.md similarity index 100% rename from RuleDocumentation/MissingModuleManifestField.md rename to docs/Rules/MissingModuleManifestField.md diff --git a/RuleDocumentation/PlaceCloseBrace.md b/docs/Rules/PlaceCloseBrace.md similarity index 100% rename from RuleDocumentation/PlaceCloseBrace.md rename to docs/Rules/PlaceCloseBrace.md diff --git a/RuleDocumentation/PlaceOpenBrace.md b/docs/Rules/PlaceOpenBrace.md similarity index 100% rename from RuleDocumentation/PlaceOpenBrace.md rename to docs/Rules/PlaceOpenBrace.md diff --git a/RuleDocumentation/PossibleIncorrectComparisonWithNull.md b/docs/Rules/PossibleIncorrectComparisonWithNull.md similarity index 100% rename from RuleDocumentation/PossibleIncorrectComparisonWithNull.md rename to docs/Rules/PossibleIncorrectComparisonWithNull.md diff --git a/RuleDocumentation/PossibleIncorrectUsageOfAssignmentOperator.md b/docs/Rules/PossibleIncorrectUsageOfAssignmentOperator.md similarity index 100% rename from RuleDocumentation/PossibleIncorrectUsageOfAssignmentOperator.md rename to docs/Rules/PossibleIncorrectUsageOfAssignmentOperator.md diff --git a/RuleDocumentation/PossibleIncorrectUsageOfRedirectionOperator.md b/docs/Rules/PossibleIncorrectUsageOfRedirectionOperator.md similarity index 100% rename from RuleDocumentation/PossibleIncorrectUsageOfRedirectionOperator.md rename to docs/Rules/PossibleIncorrectUsageOfRedirectionOperator.md diff --git a/RuleDocumentation/ProvideCommentHelp.md b/docs/Rules/ProvideCommentHelp.md similarity index 100% rename from RuleDocumentation/ProvideCommentHelp.md rename to docs/Rules/ProvideCommentHelp.md diff --git a/RuleDocumentation/README.md b/docs/Rules/README.md similarity index 100% rename from RuleDocumentation/README.md rename to docs/Rules/README.md diff --git a/RuleDocumentation/ReservedCmdletChar.md b/docs/Rules/ReservedCmdletChar.md similarity index 100% rename from RuleDocumentation/ReservedCmdletChar.md rename to docs/Rules/ReservedCmdletChar.md diff --git a/RuleDocumentation/ReservedParams.md b/docs/Rules/ReservedParams.md similarity index 100% rename from RuleDocumentation/ReservedParams.md rename to docs/Rules/ReservedParams.md diff --git a/RuleDocumentation/ReviewUnusedParameter.md b/docs/Rules/ReviewUnusedParameter.md similarity index 100% rename from RuleDocumentation/ReviewUnusedParameter.md rename to docs/Rules/ReviewUnusedParameter.md diff --git a/RuleDocumentation/ShouldProcess.md b/docs/Rules/ShouldProcess.md similarity index 100% rename from RuleDocumentation/ShouldProcess.md rename to docs/Rules/ShouldProcess.md diff --git a/RuleDocumentation/UseApprovedVerbs.md b/docs/Rules/UseApprovedVerbs.md similarity index 100% rename from RuleDocumentation/UseApprovedVerbs.md rename to docs/Rules/UseApprovedVerbs.md diff --git a/RuleDocumentation/UseBOMForUnicodeEncodedFile.md b/docs/Rules/UseBOMForUnicodeEncodedFile.md similarity index 100% rename from RuleDocumentation/UseBOMForUnicodeEncodedFile.md rename to docs/Rules/UseBOMForUnicodeEncodedFile.md diff --git a/RuleDocumentation/UseCmdletCorrectly.md b/docs/Rules/UseCmdletCorrectly.md similarity index 100% rename from RuleDocumentation/UseCmdletCorrectly.md rename to docs/Rules/UseCmdletCorrectly.md diff --git a/RuleDocumentation/UseCompatibleCmdlets.md b/docs/Rules/UseCompatibleCmdlets.md similarity index 100% rename from RuleDocumentation/UseCompatibleCmdlets.md rename to docs/Rules/UseCompatibleCmdlets.md diff --git a/RuleDocumentation/UseCompatibleCommands.md b/docs/Rules/UseCompatibleCommands.md similarity index 100% rename from RuleDocumentation/UseCompatibleCommands.md rename to docs/Rules/UseCompatibleCommands.md diff --git a/RuleDocumentation/UseCompatibleSyntax.md b/docs/Rules/UseCompatibleSyntax.md similarity index 100% rename from RuleDocumentation/UseCompatibleSyntax.md rename to docs/Rules/UseCompatibleSyntax.md diff --git a/RuleDocumentation/UseCompatibleTypes.md b/docs/Rules/UseCompatibleTypes.md similarity index 100% rename from RuleDocumentation/UseCompatibleTypes.md rename to docs/Rules/UseCompatibleTypes.md diff --git a/RuleDocumentation/UseConsistentIndentation.md b/docs/Rules/UseConsistentIndentation.md similarity index 100% rename from RuleDocumentation/UseConsistentIndentation.md rename to docs/Rules/UseConsistentIndentation.md diff --git a/RuleDocumentation/UseConsistentWhitespace.md b/docs/Rules/UseConsistentWhitespace.md similarity index 100% rename from RuleDocumentation/UseConsistentWhitespace.md rename to docs/Rules/UseConsistentWhitespace.md diff --git a/RuleDocumentation/UseCorrectCasing.md b/docs/Rules/UseCorrectCasing.md similarity index 100% rename from RuleDocumentation/UseCorrectCasing.md rename to docs/Rules/UseCorrectCasing.md diff --git a/RuleDocumentation/UseDeclaredVarsMoreThanAssignments.md b/docs/Rules/UseDeclaredVarsMoreThanAssignments.md similarity index 100% rename from RuleDocumentation/UseDeclaredVarsMoreThanAssignments.md rename to docs/Rules/UseDeclaredVarsMoreThanAssignments.md diff --git a/RuleDocumentation/UseLiteralInitializerForHashtable.md b/docs/Rules/UseLiteralInitializerForHashtable.md similarity index 100% rename from RuleDocumentation/UseLiteralInitializerForHashtable.md rename to docs/Rules/UseLiteralInitializerForHashtable.md diff --git a/RuleDocumentation/UseOutputTypeCorrectly.md b/docs/Rules/UseOutputTypeCorrectly.md similarity index 100% rename from RuleDocumentation/UseOutputTypeCorrectly.md rename to docs/Rules/UseOutputTypeCorrectly.md diff --git a/RuleDocumentation/UsePSCredentialType.md b/docs/Rules/UsePSCredentialType.md similarity index 100% rename from RuleDocumentation/UsePSCredentialType.md rename to docs/Rules/UsePSCredentialType.md diff --git a/RuleDocumentation/UseProcessBlockForPipelineCommand.md b/docs/Rules/UseProcessBlockForPipelineCommand.md similarity index 100% rename from RuleDocumentation/UseProcessBlockForPipelineCommand.md rename to docs/Rules/UseProcessBlockForPipelineCommand.md diff --git a/RuleDocumentation/UseShouldProcessForStateChangingFunctions.md b/docs/Rules/UseShouldProcessForStateChangingFunctions.md similarity index 100% rename from RuleDocumentation/UseShouldProcessForStateChangingFunctions.md rename to docs/Rules/UseShouldProcessForStateChangingFunctions.md diff --git a/RuleDocumentation/UseSingularNouns.md b/docs/Rules/UseSingularNouns.md similarity index 100% rename from RuleDocumentation/UseSingularNouns.md rename to docs/Rules/UseSingularNouns.md diff --git a/RuleDocumentation/UseSupportsShouldProcess.md b/docs/Rules/UseSupportsShouldProcess.md similarity index 100% rename from RuleDocumentation/UseSupportsShouldProcess.md rename to docs/Rules/UseSupportsShouldProcess.md diff --git a/RuleDocumentation/UseToExportFieldsInManifest.md b/docs/Rules/UseToExportFieldsInManifest.md similarity index 100% rename from RuleDocumentation/UseToExportFieldsInManifest.md rename to docs/Rules/UseToExportFieldsInManifest.md diff --git a/RuleDocumentation/UseUTF8EncodingForHelpFile.md b/docs/Rules/UseUTF8EncodingForHelpFile.md similarity index 100% rename from RuleDocumentation/UseUTF8EncodingForHelpFile.md rename to docs/Rules/UseUTF8EncodingForHelpFile.md diff --git a/RuleDocumentation/UseUsingScopeModifierInNewRunspaces.md b/docs/Rules/UseUsingScopeModifierInNewRunspaces.md similarity index 100% rename from RuleDocumentation/UseUsingScopeModifierInNewRunspaces.md rename to docs/Rules/UseUsingScopeModifierInNewRunspaces.md