Skip to content

[2.1.0] Add Static Analysis rule for Verb-SingularNoun pattern in cmdlet names #2919

@alexandair

Description

@alexandair

I've mentioned this a couple of times to PG. Unfortunately, things are not getting better. We still have a bunch of cmdlets that don't follow a naming convention and use plurals:

   Source: AzureRM.ApiManagement

CommandType Name                                    Version Source               
----------- ----                                    ------- ------               
Cmdlet      Set-AzureRmApiManagementVirtualNetworks 2.1.0   AzureRM.ApiManagement
Cmdlet      Set-AzureRmApiManagementHostnames       2.1.0   AzureRM.ApiManagement


   Source: AzureRM.Backup

CommandType Name                              Version Source        
----------- ----                              ------- ------        
Cmdlet      Get-AzureRmBackupVaultCredentials 2.1.0   AzureRM.Backup
Cmdlet      Get-AzureRmBackupJobDetails       2.1.0   AzureRM.Backup


   Source: AzureRM.Batch

CommandType Name                               Version Source       
----------- ----                               ------- ------       
Cmdlet      Get-AzureRmBatchAccountKeys        2.1.0   AzureRM.Batch
Cmdlet      Get-AzureRmBatchSubscriptionQuotas 2.1.0   AzureRM.Batch
Cmdlet      Get-AzureBatchRemoteLoginSettings  2.1.0   AzureRM.Batch
Cmdlet      Get-AzureBatchPoolUsageMetrics     2.1.0   AzureRM.Batch


   Source: AzureRM.CognitiveServices

CommandType Name                                    Version Source                   
----------- ----                                    ------- ------                   
Cmdlet      Get-AzureRmCognitiveServicesAccountSkus 0.3.0   AzureRM.CognitiveServices


   Source: AzureRM.HDInsight

CommandType Name                                      Version Source           
----------- ----                                      ------- ------           
Cmdlet      Add-AzureRmHDInsightConfigValues          2.1.0   AzureRM.HDInsight
Cmdlet      Get-AzureRmHDInsightProperties            2.1.0   AzureRM.HDInsight



   Source: AzureRM.KeyVault

CommandType Name                                             Version Source          
----------- ----                                             ------- ------          
Cmdlet      New-AzureKeyVaultCertificateOrganizationDetails  2.1.0   AzureRM.KeyVault
Cmdlet      New-AzureKeyVaultCertificateAdministratorDetails 2.1.0   AzureRM.KeyVault


   Source: AzureRM.MachineLearning

CommandType Name                        Version Source                 
----------- ----                        ------- ------                 
Cmdlet      Get-AzureRmMlWebServiceKeys 0.10.0  AzureRM.MachineLearning


   Source: AzureRM.Media

CommandType Name                                Version Source       
----------- ----                                ------- ------       
Cmdlet      Sync-AzureRmMediaServiceStorageKeys 0.2.0   AzureRM.Media
Cmdlet      Get-AzureRmMediaServiceKeys         0.2.0   AzureRM.Media


   Source: AzureRM.Network

CommandType Name                                                Version Source         
----------- ----                                                ------- ------         
Cmdlet      Set-AzureRmApplicationGatewayBackendHttpSettings    2.1.0   AzureRM.Network
Cmdlet      Remove-AzureRmApplicationGatewayBackendHttpSettings 2.1.0   AzureRM.Network
Cmdlet      New-AzureRmApplicationGatewayBackendHttpSettings    2.1.0   AzureRM.Network
Cmdlet      Add-AzureRmApplicationGatewayBackendHttpSettings    2.1.0   AzureRM.Network
Cmdlet      Get-AzureRmExpressRouteCircuitStats                 2.1.0   AzureRM.Network
Cmdlet      Get-AzureRmApplicationGatewayBackendHttpSettings    2.1.0   AzureRM.Network


   Source: AzureRM.NotificationHubs

CommandType Name                                                      Version Source                  
----------- ----                                                      ------- ------                  
Cmdlet      Get-AzureRmNotificationHubsNamespaceAuthorizationRules    2.1.0   AzureRM.NotificationHubs
Cmdlet      Remove-AzureRmNotificationHubAuthorizationRules           2.1.0   AzureRM.NotificationHubs
Cmdlet      Remove-AzureRmNotificationHubsNamespaceAuthorizationRules 2.1.0   AzureRM.NotificationHubs
Cmdlet      Get-AzureRmNotificationHubAuthorizationRules              2.1.0   AzureRM.NotificationHubs
Cmdlet      Get-AzureRmNotificationHubsNamespaceListKeys              2.1.0   AzureRM.NotificationHubs
Cmdlet      Set-AzureRmNotificationHubAuthorizationRules              2.1.0   AzureRM.NotificationHubs
Cmdlet      Get-AzureRmNotificationHubPNSCredentials                  2.1.0   AzureRM.NotificationHubs
Cmdlet      Get-AzureRmNotificationHubListKeys                        2.1.0   AzureRM.NotificationHubs
Cmdlet      New-AzureRmNotificationHubAuthorizationRules              2.1.0   AzureRM.NotificationHubs
Cmdlet      Set-AzureRmNotificationHubsNamespaceAuthorizationRules    2.1.0   AzureRM.NotificationHubs
Cmdlet      New-AzureRmNotificationHubsNamespaceAuthorizationRules    2.1.0   AzureRM.NotificationHubs


   Source: AzureRM.OperationalInsights

CommandType Name                                                    Version Source                     
----------- ----                                                    ------- ------                     
Cmdlet      Get-AzureRmOperationalInsightsSavedSearchResults        2.1.0   AzureRM.OperationalInsights
Cmdlet      Get-AzureRmOperationalInsightsSearchResults             2.1.0   AzureRM.OperationalInsights
Cmdlet      Get-AzureRmOperationalInsightsIntelligencePacks         2.1.0   AzureRM.OperationalInsights
Cmdlet      Get-AzureRmOperationalInsightsLinkTargets               2.1.0   AzureRM.OperationalInsights
Cmdlet      Get-AzureRmOperationalInsightsWorkspaceSharedKeys       2.1.0   AzureRM.OperationalInsights
Cmdlet      Get-AzureRmOperationalInsightsWorkspaceManagementGroups 2.1.0   AzureRM.OperationalInsights


   Source: AzureRM.PowerBIEmbedded

CommandType Name                                              Version Source                 
----------- ----                                              ------- ------                 
Cmdlet      Get-AzureRmPowerBIWorkspaceCollectionAccessKeys   2.1.0   AzureRM.PowerBIEmbedded
Cmdlet      Reset-AzureRmPowerBIWorkspaceCollectionAccessKeys 2.1.0   AzureRM.PowerBIEmbedded


   Source: AzureRM.RecoveryServices

CommandType Name                                        Version Source                  
----------- ----                                        ------- ------                  
Cmdlet      Get-AzureRmRecoveryServicesBackupProperties 2.1.0   AzureRM.RecoveryServices
Cmdlet      Set-AzureRmRecoveryServicesBackupProperties 2.1.0   AzureRM.RecoveryServices


   Source: AzureRM.RecoveryServices.Backup

CommandType Name                                        Version Source                         
----------- ----                                        ------- ------                         
Cmdlet      Get-AzureRmRecoveryServicesBackupJobDetails 2.1.0   AzureRM.RecoveryServices.Backup


   Source: AzureRM.SiteRecovery

CommandType Name                                 Version Source              
----------- ----                                 ------- ------              
Cmdlet      Get-AzureRmSiteRecoveryVaultSettings 2.1.0   AzureRM.SiteRecovery
Cmdlet      Set-AzureRmSiteRecoveryVaultSettings 2.1.0   AzureRM.SiteRecovery


   Source: AzureRM.Sql

CommandType Name                                              Version Source     
----------- ----                                              ------- ------     
Cmdlet      Get-AzureRmSqlDatabaseIndexRecommendations        2.1.0   AzureRM.Sql
Cmdlet      Get-AzureRmSqlDatabaseRestorePoints               2.1.0   AzureRM.Sql


   Source: AzureRM.Websites

CommandType Name                             Version Source          
----------- ----                             ------- ------          
Cmdlet      Get-AzureRmWebAppMetrics         2.1.0   AzureRM.Websites
Cmdlet      Get-AzureRmWebAppSlotMetrics     2.1.0   AzureRM.Websites
Cmdlet      Get-AzureRmAppServicePlanMetrics 2.1.0   AzureRM.Websites

The latest release introduced 2 new cmdlets (New-AzureRmKeyVaultCertificateAdministratorDetails and New-AzureRmKeyVaultCertificateOrganizationDetails)
that are breaking the rule, so it looks like the static analysis doesn't work as expected.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions