Skip to content

Commit f898cf0

Browse files
docs: enhance documentation on #Requires statements and parameter descriptions for better maintainability
1 parent 88c2bf5 commit f898cf0

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ Depending on the labels in the pull requests, the [workflow will result in diffe
5656
- [Example - `BeforeAll.ps1`](#example---beforeallps1)
5757
- [Teardown - `AfterAll.ps1`](#teardown---afterallps1)
5858
- [Example - `AfterAll.ps1`](#example---afterallps1)
59+
- [Best practices for shared test infrastructure](#best-practices-for-shared-test-infrastructure)
60+
- [Use deterministic naming with `$env:GITHUB_RUN_ID`](#use-deterministic-naming-with-envgithub_run_id)
61+
- [Clean up stale resources from previous failed runs](#clean-up-stale-resources-from-previous-failed-runs)
62+
- [Tests reference shared resources — they do not create them](#tests-reference-shared-resources--they-do-not-create-them)
63+
- [Naming conventions](#naming-conventions)
5964
- [Module tests](#module-tests)
6065
- [Get test results](#get-test-results)
6166
- [Get code coverage](#get-code-coverage)
@@ -94,7 +99,12 @@ Depending on the labels in the pull requests, the [workflow will result in diffe
9499
- [Related Configuration](#related-configuration)
95100
- [Repository structure](#repository-structure)
96101
- [Module source code structure](#module-source-code-structure)
102+
- [Declaring module dependencies](#declaring-module-dependencies)
97103
- [Principles and practices](#principles-and-practices)
104+
- [Linear versioning](#linear-versioning)
105+
- [Release and feature branches](#release-and-feature-branches)
106+
- [Co-location of concerns](#co-location-of-concerns)
107+
- [Compatibility](#compatibility)
98108

99109
### Get-Settings
100110

@@ -970,19 +980,28 @@ documentation.
970980
971981
## Principles and practices
972982

983+
### Linear versioning
984+
973985
The contribution and release process is based on the idea that a PR is a release, and we only maintain a single linear ancestry of versions, not going
974986
back to patch and update old versions of the modules. This means that if we are on version `2.1.3` of a module and there is a security issue, we only
975987
patch the latest version with a fix, not releasing new versions based on older versions of the module, i.e. not updating the latest 1.x with the
976988
patch.
977989

990+
### Release and feature branches
991+
978992
If you need to work forth a bigger release, create a branch representing the release (a release branch) and open a PR towards `main` for this branch.
979993
For each topic or feature to add to the release, open a new branch representing the feature (a feature branch) and open a PR towards the release
980994
branch. Optionally add the `Prerelease` label on the PR for the release branch, to release preview versions before merging and releasing a published
981995
version of the PowerShell module.
982996

997+
### Co-location of concerns
998+
983999
Co-locate concerns for long-term maintainability. For example, `#Requires -Modules` statements belong in the function files that use them, not in a
9841000
central manifest — this makes it immediately visible which functions drive each external dependency, and avoids silent drift between the manifest and
985-
the actual code.
1001+
the actual code. Another example is how parameter descriptions are placed as comments in the `param()` block directly above each parameter
1002+
declaration, rather than in the comment-based help at the top of the function — this keeps the description next to the code it documents.
1003+
1004+
### Compatibility
9861005

9871006
The process is compatible with:
9881007

0 commit comments

Comments
 (0)