Skip to content

fix: address Copilot review on #347 (explicit eol=lf + comment honesty)#348

Merged
Chris-Wolfgang merged 1 commit into
mainfrom
fix/ps1-eol-explicit-and-comment
May 10, 2026
Merged

fix: address Copilot review on #347 (explicit eol=lf + comment honesty)#348
Chris-Wolfgang merged 1 commit into
mainfrom
fix/ps1-eol-explicit-and-comment

Conversation

@Chris-Wolfgang

Copy link
Copy Markdown
Owner

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=lf

Every other entry in .gitattributes spells out eol=lf explicitly:

*.cs text eol=lf
*.csx text eol=lf
*.csproj text eol=lf
*.sln text eol=lf
... etc.

The bare *.ps1 text form relied on the global * text=auto eol=lf resolving to LF — behaviorally equivalent, but inconsistent with the file's own convention and ambiguous to anyone reading later.

2. .editorconfig [*.ps1] comment rewrite

The comment said "Use LF + no BOM..." but the section no longer sets end_of_line or charset — 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 .editorconfig only overrides what differs from [*] (just indent_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 pwsh shebang at the top of every script in scripts/).

What does NOT change

Note 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

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>
Copilot AI review requested due to automatic review settings May 10, 2026 00:15
@Chris-Wolfgang Chris-Wolfgang merged commit 0b68010 into main May 10, 2026
10 checks passed
@Chris-Wolfgang Chris-Wolfgang deleted the fix/ps1-eol-explicit-and-comment branch May 10, 2026 00:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 .gitattributes explicitly 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 thread .editorconfig
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants