Skip to content

ci: enforce EditorConfig across repository - #18761

Open
Tobias Brick (tobiasb-ms) wants to merge 3 commits into
microsoft:4.0from
tobiasb-ms:tobiasb-ms/enforce-editorconfig-base
Open

ci: enforce EditorConfig across repository#18761
Tobias Brick (tobiasb-ms) wants to merge 3 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 all tracked text files
  • 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
Check all tracked text files while excluding generated, legal, and centrally managed artifacts through editorconfig-checker native configuration.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Format maintained files for repository-wide EditorConfig enforcement and remove the obsolete kernel changelog source and packaging path.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@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.

🔵 Needs a closer look

The kernel payload changes need a manual release increment and the required build, inspection, and smoke-test validation.

Review details

Suppressed comments (2)

base/comps/kernel/kernel.spec:3229

  • This removal changes the kernel-doc RPM payload, but the PR validation reports only pre-commit. Repository policy requires local-spec/source changes that affect RPM output to be built, inspected, and smoke-tested (AGENTS.md:14,24-30); please add the kernel build/package validation results, or document why a required step could not be performed and what was verified instead.
tar -h -f - --exclude=man --exclude='.*' -c Documentation | tar xf - -C $docdir

base/comps/kernel/kernel.spec:859

  • This changes the kernel package contents without incrementing its manual release. kernel.comp.toml:8-12 and kernel.spec:17-20 require bumping azl_pkgrelease for a rebuild without a version change; leaving it at 3 produces altered RPMs with the existing NEVRA, so repositories cannot reliably publish or upgrade to them. Increment the macro and re-render the generated spec.
Source1: Makefile.rhelver
  • Files reviewed: 8/24 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

Removing kernel.changelog.xz changes the kernel-doc payload, so use a new package release rather than publishing different contents under the existing NEVRA.

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 10, 2026 22:36

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 kernel RPM content change still needs the repository-mandated build, inspection, and mock-chroot validation.

Review details

Suppressed comments (1)

Previously missed (1) — in code that hasn't changed since the last review.

base/comps/kernel/kernel.spec:20

  • The documented validation only runs pre-commit, but this kernel rebuild also removes kernel.changelog.xz from the kernel-doc RPM. AGENTS.md:24-30 requires RPM-output changes to be built, inspected, and smoke-tested in a mock chroot (or to document why a step is impossible). Please add that validation before merging.
  • Files reviewed: 8/24 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

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