bazel-contrib / bazel-contrib/buildtools
Buildifier overwrites Windows line endings with Unix line endings
- Dominant language
- Go
- Stars
- 1.2k
- Forks
- 471
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 13
Description
I built and ran buildifier on Windows and found that when I run it on .bzl files (e.g. BUILD.bzl) with Windows CRLF line endings, it rewrites the file with Unix line endings. It would be nice if buildifier remembered the original file line endings and outputted the file with those same line endings.
Contributor guide
Research direction
Start by reproducing the issue with buildifier on a .bzl or BUILD.bzl file using Windows CRLF line endings, then trace the formatting and output path that rewrites the file. Done means the formatter preserves the input line-ending style; add or run a regression test covering CRLF input and verify Unix line endings remain supported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100