Skip to content

Add a script to validate & fix mismatches CRLF in the repo#40933

Open
OneBlue wants to merge 3 commits into
masterfrom
user/oneblue/crlf
Open

Add a script to validate & fix mismatches CRLF in the repo#40933
OneBlue wants to merge 3 commits into
masterfrom
user/oneblue/crlf

Conversation

@OneBlue

@OneBlue OneBlue commented Jun 27, 2026

Copy link
Copy Markdown
Collaborator

Summary of the Pull Request

This change adds a script that blocks merging a change with mismatches CRLF in code files. clang-format does some of it, but it doesn't cover all files.

The files can be fixed via python tools/devops/validate-line-endings.py . --fix

This will prevent needless git conflicts and copilot getting confused

PR Checklist

  • Closes: Link to issue #xxx
  • Communication: I've discussed this with core contributors already. If work hasn't been agreed, this work might be rejected
  • Tests: Added/updated if needed and all pass
  • Localization: All end user facing strings can be localized
  • Dev docs: Added/updated if needed
  • Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx

Detailed Description of the Pull Request / Additional comments

Validation Steps Performed

Copilot AI review requested due to automatic review settings June 27, 2026 00:05
@OneBlue OneBlue requested a review from a team as a code owner June 27, 2026 00:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a repo validation script intended to detect (and optionally fix) non-CRLF line endings in tracked source files, and wires it into CI to prevent line-ending churn and merge conflicts.

Changes:

  • Added tools/devops/validate-line-endings.py to detect line-ending mismatches and optionally normalize files to CRLF.
  • Updated the build pipeline checks stage to run a line-ending validation step (intended).

Reviewed changes

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

File Description
tools/devops/validate-line-endings.py New Python validator to detect/fix non-CRLF line endings for selected tracked source files.
.pipelines/build-stage.yml Adds a CI “line feeds” check step (currently wired to the wrong script).

Comment thread .pipelines/build-stage.yml Outdated
Comment thread tools/devops/validate-line-endings.py Outdated
Comment thread tools/devops/validate-line-endings.py
Comment thread tools/devops/validate-line-endings.py Outdated
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