Context and Request
A developer cloning a PSModule repository on any platform — Windows, macOS, or Linux — expects consistent behavior: correct line endings, proper diff handling, and no silent corruption of files. The principle "Build for all developers" (added to Principles) establishes that repository configuration must reflect cross-platform support.
Currently, .gitattributes files across the PSModule organization are either missing or inconsistent. Without proper configuration, line-ending normalization depends entirely on individual developer settings (core.autocrlf), which leads to inconsistent commits, noisy diffs, and potential issues in shell scripts or CI environments.
This issue covers an organization-wide review and alignment of .gitattributes files to ensure all repositories support cross-platform development consistently.
Acceptance criteria
Technical Decisions
Line-ending strategy: Normalize all text to LF in the repository. LF is the universal standard across tooling and CI runners. Windows editors and Git handle LF natively. This aligns with the "Build for all developers" principle.
Scope: Organization-wide. All repositories under PSModule are reviewed. A standard template is established and applied consistently. Repository-specific variations are permitted only with documented justification.
Template location: The standard .gitattributes template should be documented or stored in a central location (e.g., the .github repository or this docs site) so new repositories can adopt it automatically.
Implementation Plan
Context and Request
A developer cloning a PSModule repository on any platform — Windows, macOS, or Linux — expects consistent behavior: correct line endings, proper diff handling, and no silent corruption of files. The principle "Build for all developers" (added to Principles) establishes that repository configuration must reflect cross-platform support.
Currently,
.gitattributesfiles across the PSModule organization are either missing or inconsistent. Without proper configuration, line-ending normalization depends entirely on individual developer settings (core.autocrlf), which leads to inconsistent commits, noisy diffs, and potential issues in shell scripts or CI environments.This issue covers an organization-wide review and alignment of
.gitattributesfiles to ensure all repositories support cross-platform development consistently.Acceptance criteria
.gitattributespresence and content..gitattributestemplate is defined for the organization.* text=auto eol=lfor equivalent)..sh) and PowerShell scripts (.ps1,.psm1,.psd1) have explicit line-ending rules.Technical Decisions
Line-ending strategy: Normalize all text to LF in the repository. LF is the universal standard across tooling and CI runners. Windows editors and Git handle LF natively. This aligns with the "Build for all developers" principle.
Scope: Organization-wide. All repositories under PSModule are reviewed. A standard template is established and applied consistently. Repository-specific variations are permitted only with documented justification.
Template location: The standard
.gitattributestemplate should be documented or stored in a central location (e.g., the.githubrepository or this docs site) so new repositories can adopt it automatically.Implementation Plan
.gitattributesfiles — catalog which have one, which don't, and what rules they define..gitattributestemplate covering: text normalization, markdown, PowerShell, YAML, JSON, shell scripts, images, and other binary assets..gitattributes..gitattributesto align with the standard.git add --renormalize .in each updated repository to apply the new rules to existing files.