Skip to content
Closed
Show file tree
Hide file tree
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
15 changes: 7 additions & 8 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,13 @@ indent_size = 2
[*.{yml,yaml}]
indent_size = 2

# PowerShell files
# PowerShell uses CRLF to maintain compatibility with Windows and PowerShell conventions
# This overrides the global end_of_line = lf setting and aligns with .gitattributes line 14
[*.ps1]
indent_size = 4
end_of_line = crlf
charset = utf-8-bom

# PowerShell files inherit LF + UTF-8 (no BOM) + 4-space indent from
# the global [*] section above — no [*.ps1] override needed. The
# `charset = utf-8` setting is what prevents editors from writing a
# BOM, which together with the LF requirement keeps the
# `#!/usr/bin/env pwsh` shebang (where present) on scripts under
# `scripts/` working on Linux/macOS — CR breaks the kernel's exec
# lookup, and a leading BOM prevents shebang recognition entirely.
Comment thread
Chris-Wolfgang marked this conversation as resolved.
# C# files
[*.cs]

Expand Down
15 changes: 10 additions & 5 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,16 @@
*.fsx text eol=lf

# Scripts
# PowerShell scripts: CRLF line endings (intentional override)
# Both .gitattributes and .editorconfig consistently configure PowerShell files
# to use CRLF (Windows-style) line endings for PowerShell convention compliance.
# See .editorconfig [*.ps1] section for the matching configuration.
*.ps1 text eol=crlf
# PowerShell scripts: LF line endings in the index. Required for the
# `#!/usr/bin/env pwsh` shebang (where present) to work on Linux/macOS
# — the kernel parses CR as part of the interpreter name (looking for
# `pwsh\r`). BOM avoidance is enforced separately via `.editorconfig`
Comment thread
Chris-Wolfgang marked this conversation as resolved.
# (`charset = utf-8` in the global `[*]` section); git attributes can
# only normalize line endings, not byte-order marks. The top-of-file
# `* text=auto eol=lf` rule also means Windows users get LF in their
# working tree regardless of `core.autocrlf` — intentional so the
# shebang works there too.
*.ps1 text eol=lf
Comment thread
Chris-Wolfgang marked this conversation as resolved.


# Build and configuration files
Expand Down
Loading