Declare workflow YAML as LF and validate line endings in CI#806
Closed
ptr727 wants to merge 1 commit into
Closed
Conversation
There was a problem hiding this comment.
Pull request overview
This PR standardizes line endings for GitHub Actions workflow YAML to LF (to prevent Dependabot/Actions from reintroducing mixed EOLs) and adds CI enforcement so EOL drift is caught automatically.
Changes:
- Update
.editorconfigandAGENTS.mdto document/enforce LF for.github/workflows/*.{yml,yaml}while keeping other YAML as CRLF. - Add
editorconfig-checkerconfiguration and run it in thevalidate-task.ymllint job. - Convert existing workflow files to LF and pin
.dockerignoreto LF via.gitattributes/.editorconfig.
Reviewed changes
Copilot reviewed 5 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| AGENTS.md | Documents the workflow-YAML LF exception and CI enforcement. |
| .github/workflows/validate-task.yml | Adds an editorconfig-checker Docker step to enforce line endings in CI. |
| .github/workflows/test-pull-request.yml | LF normalization only. |
| .github/workflows/publish-release.yml | LF normalization only. |
| .github/workflows/merge-bot-pull-request.yml | LF normalization only. |
| .github/workflows/get-version-task.yml | LF normalization only. |
| .github/workflows/build-release-task.yml | LF normalization only. |
| .github/workflows/build-executable-task.yml | LF normalization only. |
| .github/workflows/build-docker-task.yml | LF normalization only. |
| .gitattributes | Pins .dockerignore to LF at the git attribute level. |
| .editorconfig-checker.json | Adds config to scope editorconfig-checker checks (currently missing excludes for build output). |
| .editorconfig | Adds workflow-YAML LF rule and pins .dockerignore to LF. |
Comment on lines
+1
to
+10
| { | ||
| "Disable": { | ||
| "Charset": true, | ||
| "Indentation": true, | ||
| "IndentSize": true, | ||
| "TrimTrailingWhitespace": true, | ||
| "InsertFinalNewline": true, | ||
| "MaxLineLength": true | ||
| } | ||
| } |
Dependabot and Actions rewrite workflow YAML with LF, so pin
`.github/workflows/*.{yml,yaml}` to LF in `.editorconfig` and convert the
existing files, keeping them consistent instead of mixed on every bump. Add
`.editorconfig-checker.json` and a Docker `editorconfig-checker` step after
actionlint in the lint job so CI enforces the endings. The new checker
surfaced a pre-existing LF `.dockerignore`; normalize it to CRLF like the
`[*]` default, since it is a non-executed pattern file (the parser strips a
trailing CR) rather than execution-sensitive like a Dockerfile. Update
AGENTS.md to record that workflow YAML is LF while other YAML stays CRLF.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
3f25f07 to
f2fb35a
Compare
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.
Dependabot and Actions rewrite workflow YAML with LF, so mixed endings creep in on every bump. This pins
.github/workflows/*.{yml,yaml}to LF and adds CI enforcement..editorconfig: add[.github/workflows/*.{yml,yaml}] end_of_line = lf; convert the 8 existing workflow files to LF (line-endings-only, no content change)..editorconfig-checker.json: new config (EOL-only checks) shared by the CI step.validate-task.yml: add a Dockereditorconfig-checkerstep after actionlint in the lint job so CI catches EOL drift..dockerignore: LF-pin in.editorconfig+.gitattributes(it is already committed LF and Docker-consumed; CRLF can leak a trailing\rinto ignore patterns) so the new checker passes without changing its bytes.AGENTS.md: record that workflow YAML is LF while other YAML stays CRLF.git diff --ignore-cr-at-eolover the workflow files is empty apart from the new lint step.editorconfig-checkerruns clean locally.