Skip to content

ci: run formatting checks through pre-commit using devcontainer tools - #32

Merged
AlexanderLanin merged 3 commits into
mainfrom
steward/eclipse-score-coverage-tool/work-c8cc91bf7864
Oct 8, 2026
Merged

AlexanderLanin merged 3 commits into
mainfrom
steward/eclipse-score-coverage-tool/work-c8cc91bf7864

Conversation

@AlexanderLanin

Copy link
Copy Markdown
Member

Why

Update formatting checks to run through pre-commit on the host runner, using the shared Eclipse S-CORE devcontainer tool catalog while retaining Python, Starlark, and YAML checks.

  • Replace the formatting workflow’s Bazel test invocation with pre-commit/action@v3.0.1.
  • Add local hooks that invoke Ruff, Buildifier, and yamlfmt through the devcontainer’s Bazel tool targets in check mode.
  • Add score_devcontainer 1.11.0 as a development dependency.
  • Resolve Ruff UP038 by using int | float in coverage-value validation, preserving the explicit rejection of booleans.

Closes #29


🤖 Behind this PR

This PR came through an AI-assisted engineering workflow:

  • Issue analysis: GPT-6.1 Sol assessed the issue, investigated the repository, and estimated implementation feasibility.
  • Selection: Steward selected the issue for automatic implementation based on that assessment.
  • Implementation: GPT-6 Luna worked in a dedicated Git worktree, edited the code, and ran local checks.
  • Feedback: A human reviewed the initial attempt and supplied guidance; the agent continued from the existing changes.
  • Verification: Steward independently reran the repository’s configured checks.
  • Code review: GPT-6.1 Sol reviewed the resulting diff, with findings returned to the implementation agent for correction.
  • PR presentation: GPT-6.1 Sol drafted the title and description.
  • Publication: A human reviewed the result and approved creating this draft PR.

AI-assisted, human-guided.

@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

License Check Results

🚀 The license check job ran with the Bazel command:

bazel run //:license-check

Status: ⚠️ Needs Review

Click to expand output
[License Check Output]
Extracting Bazel installation...
Starting local Bazel server (8.6.0) and connecting to it...
INFO: Invocation ID: 80ad9192-f906-4424-b5a6-b8318cdde044
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Loading: 
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Analyzing: target //:license-check (1 packages loaded, 0 targets configured)
Analyzing: target //:license-check (1 packages loaded, 0 targets configured)

Analyzing: target //:license-check (5 packages loaded, 6 targets configured)

Analyzing: target //:license-check (5 packages loaded, 6 targets configured)

Analyzing: target //:license-check (5 packages loaded, 6 targets configured)

Analyzing: target //:license-check (5 packages loaded, 6 targets configured)

Analyzing: target //:license-check (5 packages loaded, 6 targets configured)

Analyzing: target //:license-check (5 packages loaded, 6 targets configured)

Analyzing: target //:license-check (5 packages loaded, 6 targets configured)

Analyzing: target //:license-check (5 packages loaded, 6 targets configured)

Analyzing: target //:license-check (14 packages loaded, 10 targets configured)

Analyzing: target //:license-check (78 packages loaded, 10 targets configured)

Analyzing: target //:license-check (130 packages loaded, 401 targets configured)

Analyzing: target //:license-check (151 packages loaded, 3277 targets configured)

Analyzing: target //:license-check (151 packages loaded, 3277 targets configured)

Analyzing: target //:license-check (151 packages loaded, 3277 targets configured)

Analyzing: target //:license-check (161 packages loaded, 5296 targets configured)

Analyzing: target //:license-check (166 packages loaded, 9772 targets configured)

Analyzing: target //:license-check (173 packages loaded, 9824 targets configured)

Analyzing: target //:license-check (173 packages loaded, 9824 targets configured)

Analyzing: target //:license-check (173 packages loaded, 9824 targets configured)

Analyzing: target //:license-check (177 packages loaded, 11828 targets configured)

Analyzing: target //:license-check (178 packages loaded, 11952 targets configured)

INFO: Analyzed target //:license-check (179 packages loaded, 12076 targets configured).
[12 / 16] JavaToolchainCompileClasses external/rules_java+/toolchains/platformclasspath_classes; 0s disk-cache, processwrapper-sandbox
[14 / 16] JavaToolchainCompileBootClasspath external/rules_java+/toolchains/platformclasspath.jar; 0s disk-cache, processwrapper-sandbox
[15 / 16] Building tools/license.check.license_check.jar (); 0s disk-cache, multiplex-worker
INFO: Found 1 target...
Target //tools:license.check.license_check up-to-date:
  bazel-bin/tools/license.check.license_check
  bazel-bin/tools/license.check.license_check.jar
[16 / 16] no actions running
INFO: Elapsed time: 37.533s, Critical Path: 2.81s
INFO: 16 processes: 12 internal, 3 processwrapper-sandbox, 1 worker.
INFO: Build completed successfully, 16 total actions
INFO: Running command line: bazel-bin/tools/license.check.license_check tools/formatted.txt <args omitted>
usage: org.eclipse.dash.licenses.cli.Main [-batch <int>] [-cd <url>]
       [-confidence <int>] [-ef <url>] [-excludeSources <sources>] [-help] [-lic
       <url>] [-project <shortname>] [-repo <url>] [-review] [-summary <file>]
       [-timeout <seconds>] [-token <token>]

Comment thread .github/workflows/format.yml
@MaximilianSoerenPollak

Copy link
Copy Markdown
Contributor

What about copyright_checker?

@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Documentation preview for this pull request is available at:
pr-32: https://eclipse-score.github.io/coverage_tool/pr-32/

@AlexanderLanin
AlexanderLanin force-pushed the steward/eclipse-score-coverage-tool/work-c8cc91bf7864 branch from 7f74624 to 1507b64 Compare October 8, 2026 14:20

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.

🟢 Approval recommended

The formatting migration is coherent, preserves the intended checks, and introduces no unresolved correctness issues.

0 open findings

What changed in this PR

Moves repository formatting checks from Bazel targets to pre-commit using the shared devcontainer tool catalog.

Changes:

  • Adds Ruff, Buildifier, and yamlfmt pre-commit hooks.
  • Updates CI, Bazel dependencies, lockfile, and developer instructions.
  • Modernizes numeric type validation for Ruff compatibility.
File Description
.github/​workflows/​format.yml Runs pre-commit formatting checks.
.pre-commit-config.yaml Defines formatter hooks using devcontainer tools.
MODULE.bazel Adds the devcontainer dependency.
MODULE.bazel.lock Updates resolved dependencies.
README.md Documents the new formatting command.
score_coverage/​generate_coverage_html.py Uses union syntax in numeric validation.
tools/​BUILD Removes obsolete formatting targets.

🧠 Review effort: Balanced


💡 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
Comment thread .pre-commit-config.yaml Outdated
Comment thread .pre-commit-config.yaml Outdated
Copilot AI balanced review requested due to automatic review settings October 8, 2026 19:37

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.

🟢 Approval recommended

The formatting migration is coherent, preserves the intended language coverage, and uses valid devcontainer tool targets.

0 open findings

🧠 Review effort: Balanced

@AlexanderLanin
AlexanderLanin merged commit 86ab527 into main Oct 8, 2026
11 checks passed
@AlexanderLanin
AlexanderLanin deleted the steward/eclipse-score-coverage-tool/work-c8cc91bf7864 branch October 8, 2026 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

update formatting

3 participants