Skip to content

Remove all XML help #3655

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

Merged
merged 23 commits into from
Apr 25, 2017
Merged

Remove all XML help #3655

merged 23 commits into from
Apr 25, 2017

Conversation

cormacpayne
Copy link
Member

@cormacpayne cormacpayne commented Mar 20, 2017

Description

Fix for issue #3583

  • Remove all XML help from repository
  • Add script to build that will generate markdown help, compare it to what exists in the repository, validate the markdown help, and generate XML

This checklist is used to make sure that common guidelines for a pull request are followed. You can find a more complete discussion of PowerShell cmdlet best practices here.

General Guidelines

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.
  • The pull request does not introduce breaking changes (unless a major version change occurs in the assembly and module).

Testing Guidelines

  • Pull request includes test coverage for the included changes.
  • PowerShell scripts used in tests should do any necessary setup as part of the test or suite setup, and should not use hard-coded values for locations or existing resources.

Cmdlet Signature Guidelines

  • New cmdlets that make changes or have side effects should implement ShouldProcess and have SupportShouldProcess=true specified in the cmdlet attribute. You can find more information on ShouldProcess here.
  • Cmdlet specifies OutputType attribute if any output is produced - if the cmdlet produces no output, it should implement a PassThru parameter.

Cmdlet Parameter Guidelines

  • Parameter types should not expose types from the management library - complex parameter types should be defined in the module.
  • Complex parameter types are discouraged - a parameter type should be simple types as often as possible. If complex types are used, they should be shallow and easily creatable from a constructor or another cmdlet.
  • Cmdlet parameter sets should be mutually exclusive - each parameter set must have at least one mandatory parameter not in other parameter sets.

@cormacpayne
Copy link
Member Author

@azuresdkci test this please

@cormacpayne cormacpayne changed the title [DO NOT MERGE] Remove all XML help Remove all XML help Mar 28, 2017
@cormacpayne
Copy link
Member Author

@markcowl resolved issue with wxi file

@cormacpayne
Copy link
Member Author

cormacpayne commented Mar 29, 2017

Sign job: http://azuresdkci.cloudapp.net/view/1-AzurePowerShell/job/powershell-sign/938/

Update: sign job is passing 👍

@@ -1,319 +0,0 @@
# PlatyPS Help
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's make sure to add in the new help documentation

}
}

private void ServiceManagementAnalyze(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<nit>AnalyzeMamlHelp</nit>

}
else
{
ResourceManagerAnalyze(directory, helpLogger, processedHelpFiles, savedDirectory);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<nit>AnalyzeMarkdownHelp</nit>


# ---------------------------------------------------------------------------------------------

if ($ValidateMarkdownHelp)
{
New-Item -Path "$PSScriptRoot\HelpGeneration\Exceptions" -Name NewValidateHelpExceptions.csv -ItemType File -Force | Out-Null

Add-Content "$PSscriptRoot\HelpGeneration\Exceptions\NewValidateHelpExceptions.csv" "Module,Target,Description"
Add-Content "$PSScriptRoot\HelpGeneration\Exceptions\NewValidateHelpExceptions.csv" "Module,Target,Description"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally, Exceptions are for expected errors, I think the error csvs are being copied to the build directory, and we should mnake sue of thsi same location Also, do we have any mechanism for suppressions?

Copy link
Member

@markcowl markcowl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few requested changes. Otherwise LGTM

<Message Importance="high" Text="Running Static Analyser" />
<CallTarget targets="DependencyAnalysis" />
<Exec Command="$(PowerShellCommand) -NonInteractive -NoLogo -NoProfile -Command &quot;. $(LibraryToolsFolder)\CleanupBuild.ps1 -BuildConfig $(Configuration) &quot;"/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make sure the build fails if this fails? We can do this by settign ContinueOnError="false", similar to this: https://github.com/Azure/azure-powershell/blob/stack-dev/build.proj#L369

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, lets make sure that building the installer always happens after generating help

@@ -462,9 +462,6 @@
<Component Id="cmp6BDCB170E1F314882CF58F8F80DE76A6" Guid="*">
<File Id="filBFDE1699047559AB8DA89E0F660D35DF" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Billing\Microsoft.Azure.Commands.Common.Authentication.dll" />
</Component>
<Component Id="cmpED253190CB7DAF0A995567435152DC6A" Guid="*">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should not be deleted. We need the xml help files in the installer, or there will be no online help

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@markcowl all dll-Help.xml references are still in the wxi file - the ones being removed are from projects with dependencies on other projects (e.g., Profile, Tags, Resources)

Param(
[Parameter()]
[Switch]$ValidateMarkdownHelp,

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<nit>remove extra veritcal space. You should only have a vertical space after a closing brace }, or the like </nit>

{
$HelpFolder = Get-Item $HelpFolderPath

$Exceptions = Import-Csv "$PSScriptRoot\..\..\src\Package\Exceptions\ValidateHelpExceptions.csv" | where { $_.Module -eq "$($HelpFolder.Parent.Name)" }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be a parameter

# If there were any errors recorded, print them out and throw
if ($errors.Count -gt 0)
{
$errors | foreach { Add-Content "$PSScriptRoot\..\..\src\Package\ValidateHelpExceptions.csv" $_ }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this outupe file should be a parameter. Also, I think you want this under src\Package\{buildconfig} by default in order to get it included in the build. Finally, this should be called ValdateHelpIssues.csv to be consistent with the other products of static analysis.

@@ -0,0 +1,343 @@
#Requires -Modules platyPS
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment about extra vertical space, this applies throughout

…nto remove-xml-help

# Conflicts:
#	src/ResourceManager/Compute/Commands.Compute/Commands.Compute.csproj
#	src/ResourceManager/Network/Commands.Network/Microsoft.Azure.Commands.Network.dll-Help.xml
#	src/ResourceManager/Sql/Commands.Sql/help/New-AzureRmSqlElasticPool.md
@cormacpayne
Copy link
Member Author

@cormacpayne
Copy link
Member Author

@azuresdkci test this please

@markcowl markcowl assigned cormacpayne and unassigned markcowl Apr 24, 2017
markcowl
markcowl previously approved these changes Apr 25, 2017
…nto remove-xml-help

# Conflicts:
#	src/ResourceManager/Storage/Commands.Management.Storage/Microsoft.Azure.Commands.Management.Storage.dll-Help.xml
#	src/ResourceManager/Storage/Commands.Management.Storage/help/New-AzureRmStorageAccount.md
#	src/ResourceManager/Storage/Commands.Management.Storage/help/Set-AzureRmStorageAccount.md
@markcowl markcowl merged commit c29bd5c into Azure:preview Apr 25, 2017
@cormacpayne cormacpayne deleted the remove-xml-help branch August 7, 2017 16:28
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

Successfully merging this pull request may close these issues.

3 participants