Skip to content

ci: enforce EditorConfig across repository - #18761

Merged
Christopher Co (christopherco) merged 2 commits into
microsoft:4.0from
tobiasb-ms:tobiasb-ms/enforce-editorconfig-base
Sep 12, 2026
Merged

ci: enforce EditorConfig across repository#18761
Christopher Co (christopherco) merged 2 commits into
microsoft:4.0from
tobiasb-ms:tobiasb-ms/enforce-editorconfig-base

Conversation

@tobiasb-ms

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

Copy link
Copy Markdown
Contributor

Summary

  • run EditorConfig checks against tracked text files selected by editorconfig-checker's standard policy
  • configure generated-spec, legal, and centrally managed document exclusions through editorconfig-checker's native configuration
  • clean the existing violations in maintained files, including the kernel UKI add-on configuration
  • remove the obsolete kernel changelog source and packaging path

Validation

  • pre-commit run --all-files --show-diff-on-failure

Copilot AI balanced review requested due to automatic review settings September 8, 2026 18:29

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 updated hook configuration should restrict to types: [text] to match the stated intent and avoid scanning binaries, and the PR description indicates existing violations are still outstanding.

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

Pull request overview

This PR updates the repository’s pre-commit linting configuration to enforce EditorConfig rules more broadly, while carving out documented exclusions for generated or externally managed content.

Changes:

  • Expand editorconfig-checker coverage from only *.toml to (intended) all tracked text files.
  • Add explicit, documented exclusions for generated specs and specific legal/centrally managed/upstream-artifact files.
File summaries
File Description
.pre-commit-config.yaml Broadens EditorConfig checking scope and documents path-based exclusions.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

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

Comment thread .pre-commit-config.yaml Outdated
Copilot AI review requested due to automatic review settings September 8, 2026 19:48

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

.pipelines/CodeQL/CodeQL.yml is not valid YAML due to incorrect indentation under jobs:.

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

Review details
  • Files reviewed: 2/12 changed files
  • Comments generated: 3
  • Review effort level: Lite

Comment thread .pipelines/CodeQL/CodeQL.yml
Comment thread .pre-commit-config.yaml Outdated
Comment thread specs/a/azurelinux-repos/azurelinux-repos.spec
Copilot AI review requested due to automatic review settings September 9, 2026 19:47
@tobiasb-ms
Tobias Brick (tobiasb-ms) force-pushed the tobiasb-ms/enforce-editorconfig-base branch from 0d22853 to 0fa6655 Compare September 9, 2026 19:47

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 changes are consistent with the stated goal (repo-wide EditorConfig enforcement + cleanup) and are limited to formatting/regen artifacts without introducing behavioral modifications.

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

@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) marked this pull request as ready for review September 9, 2026 21:09
@tobiasb-ms
Tobias Brick (tobiasb-ms) requested a review from a team as a code owner September 9, 2026 21:09
Comment thread .pre-commit-config.yaml Outdated
Comment thread .pre-commit-config.yaml Outdated
Copilot AI review requested due to automatic review settings September 10, 2026 18:06
@tobiasb-ms
Tobias Brick (tobiasb-ms) force-pushed the tobiasb-ms/enforce-editorconfig-base branch from 0fa6655 to 7b7cfaa Compare September 10, 2026 18:06

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

.pipelines/CodeQL/CodeQL.yml remains invalid YAML because the jobs: list item is not indented under jobs:.

Review details
  • Files reviewed: 6/17 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

Copilot AI review requested due to automatic review settings September 10, 2026 18:26
@tobiasb-ms
Tobias Brick (tobiasb-ms) force-pushed the tobiasb-ms/enforce-editorconfig-base branch from 7b7cfaa to 7ad0fc4 Compare September 10, 2026 18:26

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

It includes an uncalled-out functional change to the kernel-doc subpackage contents (removing kernel.changelog.xz), which needs explicit intent/validation or to be split/reverted.

Review details

Suppressed comments (1)

base/comps/kernel/kernel.spec:863

  • This removes Source2 and the installation/packaging of kernel.changelog.xz, which changes the contents of the kernel-doc subpackage (not just formatting). If this is intentional, it should be called out explicitly in the PR description and validated like any other RPM output change (build + smoke-test); if it’s not intentional, please revert these deletions so the shipped documentation remains unchanged.
Source0: kernel-%{specrpmversion}.%{kextraversion}.tar.gz

Source1: Makefile.rhelver

Source10: redhatsecurebootca5.cer
Source13: redhatsecureboot501.cer

  • Files reviewed: 8/24 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

Copilot AI review requested due to automatic review settings September 10, 2026 20:43
@tobiasb-ms
Tobias Brick (tobiasb-ms) force-pushed the tobiasb-ms/enforce-editorconfig-base branch from 7ad0fc4 to 54be5ef Compare September 10, 2026 20:43
@tobiasb-ms
Tobias Brick (tobiasb-ms) force-pushed the tobiasb-ms/enforce-editorconfig-base branch from 54be5ef to 3a5ca05 Compare September 10, 2026 20:45

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 kernel payload change leaves its manual release unchanged and lacks required build and mock validation.

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

Review details
  • Files reviewed: 8/24 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment thread base/comps/kernel/kernel.spec
Copilot AI review requested due to automatic review settings September 10, 2026 20:47

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 kernel-doc payload change lacks the required build, RPM inspection, and mock-chroot smoke-test evidence.

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

Review details
  • Files reviewed: 8/24 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment thread base/comps/kernel/kernel.spec
Check tracked text files selected by editorconfig-checker's standard policy while excluding generated, legal, and centrally managed artifacts through native configuration.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 11, 2026 15:20
@tobiasb-ms
Tobias Brick (tobiasb-ms) force-pushed the tobiasb-ms/enforce-editorconfig-base branch from 452002f to b50c8cc Compare September 11, 2026 15:20
@tobiasb-ms
Tobias Brick (tobiasb-ms) marked this pull request as draft September 11, 2026 15:21

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

Built-in checker exclusions still omit tracked text files such as patches, contradicting the stated repository-wide coverage.

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

Review details
  • Files reviewed: 8/24 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment thread .editorconfig-checker.json
Copilot AI review requested due to automatic review settings September 11, 2026 16: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.

🔵 Needs a closer look

Built-in checker exclusions undermine the stated coverage, and required RPM validation is not documented.

Review details

Suppressed comments (2)

.editorconfig-checker.json:3

  • This configuration does not actually enforce EditorConfig on all tracked text files. editorconfig-checker 3.11.1 merges built-in exclusions unless IgnoreDefaults is enabled; those defaults include *.patch and *.svg, and this repository has maintained examples under base/comps/ that are outside the explicit specs/ exclusion. Enable IgnoreDefaults so the hook's inherited types: [text] filter and this explicit exclusion list define the intended scope.
  "$schema": "https://raw.githubusercontent.com/editorconfig-checker/editorconfig-checker/v3.11.1/.editorconfig-checker.schema.json",
  "Exclude": [

base/comps/kernel/kernel.spec:20

  • The validation still lists only pre-commit, but this rebuild removes kernel.changelog.xz from the kernel-doc payload and also changes several component releases. AGENTS.md:14,24-30 requires output-affecting local spec/source changes to be built, inspected, and smoke-tested, or to document why a step is impossible. Please add the relevant component build and mock inspection/smoke-test results before approval.
%define azl_pkgrelease 4
  • Files reviewed: 10/27 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

Format maintained files for repository-wide EditorConfig enforcement, remove the obsolete packaged kernel changelog, and keep the kernel and kernel-headers releases synchronized.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: cdca3ce4-e087-4117-a5be-f57de435b9d9
Copilot AI review requested due to automatic review settings September 11, 2026 16:16
@tobiasb-ms
Tobias Brick (tobiasb-ms) force-pushed the tobiasb-ms/enforce-editorconfig-base branch from c165edd to a5a9986 Compare September 11, 2026 16:16

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

The RPM payload changes still lack the required build, inspection, and mock smoke-test validation.

Review details

Suppressed comments (1)

base/comps/kernel/kernel.spec:20

  • The PR validation still lists only pre-commit, but this release bump accompanies an RPM payload change (removal of kernel.changelog.xz). AGENTS.md:24-30 requires output-affecting component changes to be built, inspected, and smoke-tested in mock. Please run and report those checks (or document why a step cannot be performed) before merging.
%define azl_pkgrelease 4
  • Files reviewed: 10/27 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

@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) force-pushed the tobiasb-ms/enforce-editorconfig-base branch from a5a9986 to b2ec0e8 Compare September 11, 2026 22:10
@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) marked this pull request as ready for review September 11, 2026 22:17
Copilot AI review requested due to automatic review settings September 11, 2026 22:17

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 kernel-doc payload change still lacks the required build, RPM inspection, and mock-chroot smoke-test validation.

Get a fresh assessment by requesting another Copilot review.

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

@christopherco

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

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

@christopherco

Copy link
Copy Markdown
Collaborator

Bypassing the scratch build check. Dev scratch environment is backed up, and prod scratch environment passed as expected

@christopherco
Christopher Co (christopherco) merged commit c8bec0b into microsoft:4.0 Sep 12, 2026
10 of 11 checks passed
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.

4 participants