Skip to content

Declare workflow YAML as LF and validate line endings in CI#806

Closed
ptr727 wants to merge 1 commit into
developfrom
feature/workflow-eol-lf
Closed

Declare workflow YAML as LF and validate line endings in CI#806
ptr727 wants to merge 1 commit into
developfrom
feature/workflow-eol-lf

Conversation

@ptr727

@ptr727 ptr727 commented Jul 6, 2026

Copy link
Copy Markdown
Owner

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 Docker editorconfig-checker step 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 \r into 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-eol over the workflow files is empty apart from the new lint step. editorconfig-checker runs clean locally.

Copilot AI review requested due to automatic review settings July 6, 2026 18:43

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.

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 .editorconfig and AGENTS.md to document/enforce LF for .github/workflows/*.{yml,yaml} while keeping other YAML as CRLF.
  • Add editorconfig-checker configuration and run it in the validate-task.yml lint job.
  • Convert existing workflow files to LF and pin .dockerignore to 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>
@ptr727 ptr727 closed this Jul 6, 2026
@ptr727 ptr727 force-pushed the feature/workflow-eol-lf branch from 3f25f07 to f2fb35a Compare July 6, 2026 19:02
@ptr727 ptr727 requested a review from Copilot July 6, 2026 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants