Skip to content

chore: store text files with LF line endings - #204

Merged
DevSecNinja merged 1 commit into
mainfrom
steward/lf-line-endings
Nov 18, 2026
Merged

DevSecNinja merged 1 commit into
mainfrom
steward/lf-line-endings

Conversation

@DevSecNinja

@DevSecNinja DevSecNinja commented Nov 18, 2026 •

Copy link
Copy Markdown
Owner

Description

Stores every text file with LF line endings, as the fleet-wide LF work (DevSecNinja/repo-steward#204) sets out, so the shared Lint workflow's new line-endings check passes.

Changes

File Change
.devcontainer/devcontainer.json 19 CRLF lines → LF
.gitignore 12 CRLF lines → LF
.lefthook.toml 39 CRLF lines → LF
.vscode/extensions.json 6 CRLF lines → LF
.vscode/settings.json 30 CRLF lines → LF
LICENSE 20 CRLF lines → LF
cliff.toml 43 CRLF lines → LF
cog.toml 17 CRLF lines → LF
renovate.json5 16 CRLF lines → LF
.gitattributes new file

Converted files are byte-identical apart from \r\n → \n. JSON, JSON5, TOML, YAML and Markdown parsers read both, so nothing behaves differently.

.gitattributes is DevSecNinja/.github's config-sync template (DevSecNinja/.github#579 and #584): * text=auto eol=lf, CRLF checkouts only for *.bat/*.cmd, binary for common binary types. Config-sync would add the same file once this repository's config-sync pin reaches the release that ships it; it never overwrites an existing one.

.editorconfig, .gitleaks.toml and dprint.json are CRLF too, but the open config-sync PR #198 replaces them with the central LF copies, so this PR leaves them alone. No file overlaps #198.

Rollback: close this PR, or revert its squash commit.

Closes #203

Summary by CodeRabbit

  • Chores
    • Standardized line endings across repository files.
    • Added consistent rules for text, binary, and platform-specific files.
    • No configuration settings or behaviors changed.

Refs #203

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The pull request adds .gitattributes rules for repository line endings and file types. It also normalizes line endings in existing configuration, license, and ignore files without changing their settings.

Changes: Repository Line-Ending Policy

Layer / File(s) Summary
Define Git attributes
.gitattributes
The new rules set LF as the default for text files, define line-ending exceptions for shell and Windows command files, and set attributes for patches, SVGs, and binary file types.
Normalize existing text files
.devcontainer/devcontainer.json, .gitignore, .lefthook.toml, .vscode/extensions.json, .vscode/settings.json, LICENSE, cliff.toml, cog.toml, renovate.json5
These files retain their existing settings and content while using LF line endings. .gitignore also gains blank lines between sections.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Merge Risk: Minimal · up to 476cf

This change normalizes text files to LF line endings and adds Git attribute rules. It is not expected to change runtime behavior and is low risk to merge; reverting is straightforward.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the primary change: text files are stored with LF line endings. The PR converts the listed text files from CRLF to LF and adds a .gitattributes file that sets LF as the default, which …
Linked Issues check Passed Issue #203 requires LF line endings for the nine listed files and a .gitattributes that makes LF the default. At the reviewed head, .gitattributes exists and contains * text=auto eol=lf, which s…
Out of Scope Changes check Passed All changed files are either listed in #203 or are .gitattributes, which #203 names. The PR leaves .editorconfig, .gitleaks.toml, and dprint.json unchanged, as the PR description states. The `…
Full details: Title check

Explanation

The title names the primary change: text files are stored with LF line endings. The PR converts the listed text files from CRLF to LF and adds a .gitattributes file that sets LF as the default, which matches the title. The 'chore:' prefix is a conventional-commit type and is accurate for a line-ending normalization.

Full details: Linked Issues check

Explanation

Issue #203 requires LF line endings for the nine listed files and a .gitattributes that makes LF the default. At the reviewed head, .gitattributes exists and contains * text=auto eol=lf, which sets the LF default. The PR converts all nine listed files (.devcontainer/devcontainer.json, .gitignore, .lefthook.toml, .vscode/extensions.json, .vscode/settings.json, LICENSE, cliff.toml, cog.toml, renovate.json5) from CRLF to LF, per the PR description and the summary line counts. A focused diff of .gitignore shows the same text on both sides with only line endings changed. The issue has no coding requirement beyond these items. Automated line-ending checks are in the shared Lint workflow, outside this repository's changed files. The requirements are met as far as the evidence shows. The line-ending conversion was confirmed by diff for .gitignore only, not byte-by-byte for every file.

Full details: Out of Scope Changes check

Explanation

All changed files are either listed in #203 or are .gitattributes, which #203 names. The PR leaves .editorconfig, .gitleaks.toml, and dprint.json unchanged, as the PR description states. The .gitattributes rules include binary, script, batch, patch, and SVG entries. These rules support the LF default and do not add unrelated behavior. The raw summary says .gitignore gained blank lines between sections. The focused diff of .gitignore does not show this. That summary claim does not change the assessment because .gitignore is in scope either way.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5461b119-61ab-499b-841b-223927d3f624
Commits

Reviewing files that changed from the base of the PR and between b53a816 and 476cf6c.

Files selected for processing: 10

  • .devcontainer/devcontainer.json
  • .gitattributes
  • .gitignore
  • .lefthook.toml
  • .vscode/extensions.json
  • .vscode/settings.json
  • LICENSE
  • cliff.toml
  • cog.toml
  • renovate.json5

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues were identified for the line-ending normalization and .gitattributes changes.

No open issues 🎉

What changed in this PR

Standardizes line endings in the blog repository to support the shared lint workflow’s LF requirement and address #203. Files managed by the pending config-sync PR #198 remain untouched.

Changes:

  • Converts nine existing files from CRLF to LF without changing their text.
  • Adds .gitattributes to default to LF, preserve CRLF checkouts for batch scripts, and exclude binary files from conversion.
File Description
renovate.json5 Normalizes Renovate configuration to LF.
LICENSE Normalizes license text to LF.
cog.toml Normalizes release configuration to LF.
cliff.toml Normalizes changelog configuration to LF.
.vscode/​settings.json Normalizes editor settings to LF.
.vscode/​extensions.json Normalizes extension recommendations to LF.
.lefthook.toml Normalizes Git hook configuration to LF.
.gitignore Normalizes ignore rules to LF.
.gitattributes Defines line-ending defaults and binary exceptions.
.devcontainer/​devcontainer.json Normalizes development container configuration to LF.

Review effort: Balanced

@DevSecNinja
DevSecNinja merged commit a683a29 into main Nov 18, 2026
15 checks passed
@DevSecNinja
DevSecNinja deleted the steward/lf-line-endings branch November 18, 2026 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore: store text files with LF line endings

2 participants