fix: address Copilot review on #347 (explicit eol=lf + comment honesty)#348
Merged
Merged
Conversation
Two stylistic follow-ups Copilot flagged on #347 that landed after the merge: 1. .gitattributes: change '*.ps1 text' to '*.ps1 text eol=lf' to match the explicit-eol convention every other entry uses (.cs, .csproj, .sln, etc. all spell it out). Behavior-equivalent — the global '* text=auto eol=lf' default would resolve to lf anyway — but consistent with the file's pattern and unambiguous to future editors. 2. .editorconfig [*.ps1]: rewrite the comment so it accurately describes that LF + no-BOM come from the global [*] section above (not from this section). Every other [*.xxx] section in .editorconfig only overrides what differs from [*], so the PS-section is intentionally minimal — the comment now explains both the convention (only override differences) and the underlying reason LF + no-BOM matters here (the shebang in scripts/ files). No code/file content changes — just attr declaration sharpening and comment honesty. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Refines template repo EOL declarations and documentation to align PowerShell handling with the established “explicit LF” convention and keep .editorconfig commentary accurate.
Changes:
- Make
.gitattributesexplicitly declare*.ps1 text eol=lf(matching other entries in the file). - Rewrite the
.editorconfig[*.ps1]comment to describe that the section only overrides indentation and that LF/UTF-8 comes from[*].
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
.gitattributes |
Makes PowerShell LF normalization explicit via eol=lf to match file conventions. |
.editorconfig |
Updates the [*.ps1] comment to reflect current settings and rationale for LF/no-BOM. |
Comment on lines
+30
to
+33
| # global [*] section above. LF + no-BOM is required for the | ||
| # `#!/usr/bin/env pwsh` shebang at the top of every script in scripts/ | ||
| # to work on Linux/macOS — CR breaks the kernel's exec lookup, and a | ||
| # leading BOM prevents shebang recognition entirely. |
This was referenced May 10, 2026
This was referenced May 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two stylistic follow-ups Copilot flagged on #347 that I pushed after the merge — they didn't make it in.
Changes
1.
.gitattributes:*.ps1 text→*.ps1 text eol=lfEvery other entry in
.gitattributesspells outeol=lfexplicitly:The bare
*.ps1 textform relied on the global* text=auto eol=lfresolving to LF — behaviorally equivalent, but inconsistent with the file's own convention and ambiguous to anyone reading later.2.
.editorconfig[*.ps1]comment rewriteThe comment said "Use LF + no BOM..." but the section no longer sets
end_of_lineorcharset— those come from the[*]global section above. The old comment described what the previous CRLF/BOM overrides used to enforce, not what the current section does.Every other
[*.xxx]section in.editorconfigonly overrides what differs from[*](justindent_size), so the [*.ps1] section is intentionally minimal. New comment explains both the convention and why LF + no-BOM matters in this repo (the#!/usr/bin/env pwshshebang at the top of every script inscripts/).What does NOT change
.ps1files rewrittenNote about the protected-files guard
Touches
.editorconfig(protected). Maintainer override required — same path as #347 itself.Follow-up
Once this lands, the 24 fleet-sync PRs to apply the #347 + this fix will use these final declarations directly.
Test plan