Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/instructions/script-module-file-format.instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
applyTo:
- "**/*.ps1"
- "**/*.psm1"
---

# Script and Module File Format

These instructions define required file-level formatting for PowerShell scripts and module files in this repository.

## Copyright Header

If a change adds a new `.ps1` file or `.psm1` file or touches an existing one, the file should start with the copyright and license header and have an empty line after it, as shown in the example below:

Comment thread
anamnavi marked this conversation as resolved.
```powershell
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
```
Comment thread
anamnavi marked this conversation as resolved.

Do not place blank lines, comments, or code before this header.

## Requirements

- Add the copyright header when creating a new `.ps1` or `.psm1` file.
- Preserve the header when editing an existing `.ps1` or `.psm1` file.
- If an existing `.ps1` or `.psm1` file is missing the header, only modify that file to add the header if a change touches that file. Do not make a change to add the header if the file is not being modified.
Loading