chore(git): add .gitattributes with LF line ending normalization#5
Closed
algorithmpoet wants to merge 1 commit into
Closed
Conversation
Add a .gitattributes file to enforce LF line endings across all text files, preventing CRLF issues on Windows and ensuring consistent formatting across contributors and CI environments. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Task-Id: 01KQ131SED9HAZ7XB24QXV2FVB Prompt-Version: 1c9c10e027a2
13 tasks
|
This pull request is now marked as stale because it hasn't seen activity for a while. Add a comment or it will be closed soon. If you wish to exclude this issue from being marked as stale, add the "backlog" label. |
|
Closing this pull request as it hasn't seen activity for a while. Please add a comment @mentioning a maintainer to reopen. If you wish to exclude this issue from being marked as stale, add the "backlog" label. |
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
.gitattributesfile to enforce LF line endings for all text files* text=auto eol=lfas the global default for automatic normalization.md,.json,.yaml,.yml,.toml,.py,.js,.cjs,.ts,.sh, etc.) witheol=lfMotivation
Without
.gitattributes, contributors on Windows may commit files with CRLF line endings, causing noisy diffs and potential CI failures. This file ensures consistent LF endings across all platforms and contributors.Build and test results
mise run build— PASSED (lint, fmt:check, validate, security all green)mise run lint— PASSEDDecisions made
* text=auto eol=lfas the catch-all rule so Git auto-detects text vs. binary files and normalizes to LFbinaryto prevent any line-ending conversionAgent notes
What went well: The task was straightforward — the repo had no existing
.gitattributes, so there were no conflicts. Themise run buildcommand provided a convenient one-stop check for lint, formatting, validation, and security.What was difficult: Nothing significant — clean codebase with well-organized tooling.
Patterns/conventions discovered:
misefor all task running; always usemise run <task>rather than raw tool commands<type>(<module>): descriptionbuildtask runs lint + fmt:check + validate + security in sequencedprintis used for formatting;.gitattributesis not a file type dprint touches, so no fmt issuesSuggestions for future tasks:
.editorconfigalongside.gitattributesfor consistent editor settingsmise run pre-committask runs pre-commit hooks — worth verifying hooks include line-ending checks after this changeBy submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.