Skip to content

ci: enforce EditorConfig with pre-commit - #18694

Merged
Tobias Brick (tobiasb-ms) merged 2 commits into
4.0from
tobiasb-ms/enforce-toml-editorconfig-pre-commit
Sep 3, 2026
Merged

ci: enforce EditorConfig with pre-commit#18694
Tobias Brick (tobiasb-ms) merged 2 commits into
4.0from
tobiasb-ms/enforce-toml-editorconfig-pre-commit

Conversation

@tobiasb-ms

@tobiasb-ms Tobias Brick (tobiasb-ms) commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a pinned editorconfig-checker hook through pre-commit
  • run the hook against all tracked TOML files in the existing lint job
  • document the same local workflow and optional git hook installation

Validation

The initial implementation intentionally left the existing TOML formatting violations unchanged. The first lint run failed with 33 errors, demonstrating that the hook detected:

  • 31 files without a final newline
  • 2 files with trailing whitespace

A separate cleanup commit repaired those violations, and the follow-up lint run passed.

This is an alternative to #18691 for comparing direct checker integration with a reusable pre-commit framework.

Copilot AI balanced review requested due to automatic review settings September 2, 2026 17:23

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.

🟡 Changes recommended

The new required check has 33 baseline failures, and the remote hook should be pinned to an immutable commit SHA.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds EditorConfig enforcement for tracked TOML files using pre-commit.

Changes:

  • Adds a pinned editorconfig-checker hook.
  • Runs formatting validation in CI.
  • Documents local usage and hook installation.
File summaries
File Description
.pre-commit-config.yaml Configures TOML checking.
.github/workflows/lint.yaml Adds pre-commit validation to CI.
CONTRIBUTING.md Documents the local workflow.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 2
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/lint.yaml Outdated
Comment thread .pre-commit-config.yaml Outdated
Copilot AI review requested due to automatic review settings September 2, 2026 17:27

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.

🟡 Changes recommended

The description claims the check should fail, but the included baseline cleanup makes it pass.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 3/36 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment thread lychee.toml
Copilot AI review requested due to automatic review settings September 2, 2026 17:55
@tobiasb-ms
Tobias Brick (tobiasb-ms) force-pushed the tobiasb-ms/enforce-toml-editorconfig-pre-commit branch from 1f7bcf3 to 307b09a Compare September 2, 2026 17:58

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.

🔵 Needs a closer look

Touched component inputs require refreshed locks and post-commit rendered specifications to prevent release and changelog drift.

Review details
  • Files reviewed: 3/36 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

Copilot AI review requested due to automatic review settings September 2, 2026 17:59

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.

🟢 Approval recommended

The hook is immutably pinned, CI passes, and the baseline cleanup introduces no semantic changes.

Review details
  • Files reviewed: 3/36 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

@tobiasb-ms
Tobias Brick (tobiasb-ms) marked this pull request as ready for review September 2, 2026 18:11
@tobiasb-ms
Tobias Brick (tobiasb-ms) requested a review from a team as a code owner September 2, 2026 18:11

@reubeno reuben olinsky (reubeno) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

One question for you regarding GitHub action, but the rest of the PR looks great to me.

Comment thread .github/workflows/lint.yaml Outdated
Copilot AI review requested due to automatic review settings September 2, 2026 19:49

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.

🟡 Changes recommended

Component outputs require post-commit regeneration, and the new Python runtime should be pinned.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 5/38 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment thread .github/workflows/lint.yaml Outdated
@reubeno

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
2 pipeline(s) were filtered out due to trigger conditions.

Copilot AI review requested due to automatic review settings September 3, 2026 16:46
@tobiasb-ms
Tobias Brick (tobiasb-ms) force-pushed the tobiasb-ms/enforce-toml-editorconfig-pre-commit branch from 3aecec4 to 9b623fe Compare September 3, 2026 16:46

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.

🟢 Approval recommended

The implementation is consistently pinned, documented, integrated into CI, and validated against a clean baseline.

Review details
  • Files reviewed: 5/5 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

Copilot AI review requested due to automatic review settings September 3, 2026 16:52
@tobiasb-ms

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
2 pipeline(s) were filtered out due to trigger conditions.

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.

🟢 Approval recommended

The enforcement, documentation, dependency automation, and baseline cleanup are consistent and validated by the passing lint run.

Review details
  • Files reviewed: 5/38 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

Add a pinned editorconfig-checker hook and run it through pre-commit in
both CI and the documented local workflow. This establishes a shared
framework that can host additional repository checks later.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 3, 2026 16:59
@tobiasb-ms
Tobias Brick (tobiasb-ms) force-pushed the tobiasb-ms/enforce-toml-editorconfig-pre-commit branch from 726eeee to 7674ff9 Compare September 3, 2026 16:59

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.

Copilot reviewed 5 out of 38 changed files in this pull request and generated no new comments.

@tobiasb-ms

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
2 pipeline(s) were filtered out due to trigger conditions.

@tobiasb-ms
Tobias Brick (tobiasb-ms) merged commit 142ff3b into 4.0 Sep 3, 2026
16 checks passed
@tobiasb-ms
Tobias Brick (tobiasb-ms) deleted the tobiasb-ms/enforce-toml-editorconfig-pre-commit branch September 3, 2026 17:23
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.

3 participants