Azure / Azure/autorest.powershell

[Feature]: Allow autorest process to perform Powershell release compliance testing

Open
#1,442 1 comment 0 reactions 0 assignees View on GitHub
feature-request Tracking
Dominant language
C#
Stars
123
Forks
99
PR merge metrics
No merged PRs in 30d

Description

### Description of the new feature

Whilst developing a Powershell module that required custom interfaces, we discovered that we had to maintain back-compatibility with Powershell v5.1 (Desktop) and then that we had used features that were not supported in this old version of Powershell. Fortunately `PSScriptAnalyzer` (Invoke-ScriptAnalyzer) can be used to check compliance with different levels of Powershell as describe in the ref below.

We propose that such checking be added to the autorest generation process such that developers can choose to enable such checking and ensure that future changes do not break such requirements.

- https://devblogs.microsoft.com/powershell/using-psscriptanalyzer-to-check-powershell-version-compatibility/
- https://learn.microsoft.com/en-gb/powershell/utility-modules/psscriptanalyzer/rules/usecompatiblecommands?view=ps-modules

### Proposed implementation details (optional)

https://github.com/Azure/azure-powershell/pull/26540 has a proposed tool that can be used to manually perform such a check based on configuration in the `autorest` `README.md` file. This might be used as the basis for the proposed feature.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.