You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clarify helper functions must be separate private functions (#72)
## Summary
- add an explicit module standard that helper logic must not be defined
as nested/internal helper functions
- require helper logic to be implemented as separate private function
files under src/functions/private/<Group>/
## Why
This keeps function structure consistent with the one-function-per-file
model and makes helpers reusable and testable.
---------
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copy file name to clipboardExpand all lines: src/docs/Modules/Standards.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,6 +42,7 @@ Layout rules:
42
42
-**One declaration per file.** Filename matches the declared symbol exactly, including casing.
43
43
-**Group by domain.** Use resource or behaviour groups — not verb folders, not endpoint paths.
44
44
-**Mirror public and private domains.** Public command under `src/functions/public/Projects/` has related private helpers under `src/functions/private/Projects/`.
45
+
-**No nested functions.** Do not define helper functions inside other functions. Extract helper logic to a separate function file and decide whether it belongs in `src/functions/private/<Group>/` (internal-only) or `src/functions/public/<Group>/` (part of the module API).
45
46
-**Declare dependencies where they are used.** Use `#Requires -Modules <Name>` at the top of each function file that needs an external module. Do not add `RequiredModules` to `src/manifest.psd1` — the build collects all `#Requires` declarations automatically and writes them into the compiled manifest. Entries in `src/manifest.psd1` are silently ignored for this purpose.
46
47
-**Group documentation pages with source.** Place a `<Group>.md` file alongside the function files in each `src/functions/public/<Group>/` folder to provide a category overview in generated documentation.
0 commit comments