Skip to content

Enforce LF line endings to fix yamllint CRLF failures on Windows#469

Merged
jbampton merged 4 commits intomainfrom
copilot/fix-yamllint-failure-windows
May 2, 2026
Merged

Enforce LF line endings to fix yamllint CRLF failures on Windows#469
jbampton merged 4 commits intomainfrom
copilot/fix-yamllint-failure-windows

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 2, 2026

  • Add .gitattributes to enforce LF line endings
  • Update mixed-line-ending hook with --fix=lf
  • Expand binary file list in .gitattributes (add webp, avif, pdf, woff, woff2)
  • Add types: [text] to mixed-line-ending hook

Copilot AI linked an issue May 2, 2026 that may be closed by this pull request
- Add .gitattributes to enforce LF line endings globally and explicitly for YAML files
- Update mixed-line-ending pre-commit hook with --fix=lf to auto-convert CRLF to LF

Agent-Logs-Url: https://github.com/NextCommunity/NextCommunity.github.io/sessions/fc11f167-090e-4ef0-ae2b-ec48c570f076

Co-authored-by: jbampton <418747+jbampton@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix yamllint failure on Windows with pre-commit Enforce LF line endings to fix yamllint CRLF failures on Windows May 2, 2026
Copilot AI requested a review from jbampton May 2, 2026 21:28
@jbampton jbampton marked this pull request as ready for review May 2, 2026 21:29
@jbampton jbampton requested a review from BaseMax as a code owner May 2, 2026 21:29
@jbampton jbampton added good first issue Good for newcomers tests pre_commit Pull requests that update pre_commit code labels May 2, 2026
@jbampton jbampton moved this to Review in progress in Next May 2, 2026
@jbampton jbampton added this to the Turbo milestone May 2, 2026
@jbampton jbampton requested a review from Copilot May 2, 2026 21:30
@jbampton
Copy link
Copy Markdown
Member

jbampton commented May 2, 2026

/gemini review

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR reduces Windows-specific lint failures by standardizing line endings to LF across the repository so yamllint doesn’t fail on CRLF-checked-out YAML files.

Changes:

  • Add a .gitattributes file to normalize text files to LF and mark common image formats as binary.
  • Update the existing mixed-line-ending pre-commit hook to auto-fix line endings to LF.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
.gitattributes Enforces LF normalization for text (explicitly for YAML) and declares common image formats as binary.
.pre-commit-config.yaml Configures mixed-line-ending hook to automatically convert to LF instead of only reporting.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a .gitattributes file to enforce LF line endings and updates the mixed-line-ending pre-commit hook to automatically fix line endings to LF. The review feedback suggests expanding the list of explicitly defined binary files in .gitattributes to prevent potential corruption and adding a type filter to the pre-commit hook to improve efficiency by avoiding the processing of binary files.

Comment thread .gitattributes
Comment thread .pre-commit-config.yaml
Copilot AI requested a review from jbampton May 2, 2026 21:39
@jbampton jbampton requested a review from Copilot May 2, 2026 21:39
@jbampton
Copy link
Copy Markdown
Member

jbampton commented May 2, 2026

/gemini review

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a .gitattributes file to enforce LF line endings and correctly handle binary files. It also updates the .pre-commit-config.yaml to configure the mixed-line-ending hook to automatically fix line endings to LF. Feedback was provided to remove a redundant types: [text] configuration from the pre-commit hook, as this is already the default behavior.

Comment thread .pre-commit-config.yaml Outdated
Comment on lines +109 to +110
args: [--fix=lf]
types: [text]
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The types: [text] property is redundant because the mixed-line-ending hook already includes types: [text] in its default configuration (as defined in the pre-commit-hooks manifest). Removing it keeps the configuration cleaner without changing the behavior.

        args: [--fix=lf]

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .pre-commit-config.yaml Outdated
@jbampton jbampton merged commit b845f93 into main May 2, 2026
16 checks passed
@jbampton jbampton deleted the copilot/fix-yamllint-failure-windows branch May 2, 2026 21:45
@github-project-automation github-project-automation Bot moved this from Review in progress to Done in Next May 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

good first issue Good for newcomers pre_commit Pull requests that update pre_commit code tests

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

yamllint failure on Windows with pre-commit

3 participants