Add StaticAnalysis rule to fail cmdlets not using approved verbs
Fix for issue https://github.com/Azure/azure-powershell/issues/3004
- Add list of approved PowerShell verbs
- Add rule that will fail if a cmdlet is not using an approved verb
- Add tests for the new rule
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](https://msdn.microsoft.com/en-us/library/dd878270(v=vs.85).aspx).
- [x] **I have read the [contribution guidelines](https://github.com/Azure/azure-powershell/blob/dev/CONTRIBUTING.md).**
### [General Guidelines](https://github.com/Azure/azure-powershell/blob/dev/CONTRIBUTING.md#general-guidelines)
- [x] Title of the pull request is clear and informative.
- [x] 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](https://github.com/Azure/azure-powershell/blob/dev/documentation/cleaning-up-commits.md).
- [x] The pull request does not introduce [breaking changes](https://github.com/Azure/azure-powershell/blob/dev/documentation/breaking-changes.md) (unless a major version change occurs in the assembly and module).
### [Testing Guidelines](https://github.com/Azure/azure-powershell/blob/dev/CONTRIBUTING.md#testing-guidelines)
- [x] Pull request includes test coverage for the included changes.
- [x] 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](https://github.com/Azure/azure-powershell/blob/dev/CONTRIBUTING.md#cmdlet-signature-guidelines)
- [x] 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](https://gist.github.com/markcowl/338e16fe5c8bbf195aff9f8af0db585d#what-is-the-change).
- [x] Cmdlet specifies `OutputType` attribute if any output is produced - if the cmdlet produces no output, it should implement a `PassThrough` parameter.
### [Cmdlet Parameter Guidelines](https://github.com/Azure/azure-powershell/blob/dev/CONTRIBUTING.md#cmdlet-parameter-guidelines)
- [x] Parameter types should not expose types from the management library - complex parameter types should be defined in the module.
- [x] 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.
- [x] Cmdlet parameter sets should be mutually exclusive - each parameter set must have at least one mandatory parameter not in other parameter sets.
@shahabhijeet any other comments?
On demand run here: http://azuresdkci.cloudapp.net/view/1-AzurePowerShell/job/powershell-demand/1254/
LGTM once the on-demand run passes.
@cormacpayne Looks like the on-demand run fails due to the new test. See the log for the on-demand run
Edit: on-demand here: http://azuresdkci.cloudapp.net/view/1-AzurePowerShell/job/powershell-demand/1267/
@markcowl @shahabhijeet adding a "Do Not Merge" tag on this PR.
Previously, the test `AddVerbWithoutSupportsShouldProcessParameter` was failing on the on-demand job and every other test was passing.
Now, the test `ForceParameterWithoutSupportsShouldProcess` is failing on the on-demand job, so we need to investigate why this is happening next release.
@markcowl @shahabhijeet would you guys mind taking a look at this PR?