Skip to content

tests: use devcontainer buildifier in pre-commit - #919

Merged
AlexanderLanin merged 3 commits into
eclipse-score:mainfrom
1cbyc:1cbyc/917-devcontainer-buildifier
Nov 2, 2026
Merged

AlexanderLanin merged 3 commits into
eclipse-score:mainfrom
1cbyc:1cbyc/917-devcontainer-buildifier

Conversation

@1cbyc

@1cbyc 1cbyc commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

📌 Description

Fixes #917.

  • formats Bazel and Starlark files with the devcontainer-provided Buildifier through .devcontainer/run-tool
  • removes the direct buildifier_prebuilt dependency
  • refreshes the Bazel module lockfile

🚨 Impact Analysis

  • This change does not violate any tool requirements and is covered by existing tool requirements
  • This change does not violate any design decisions
  • Otherwise I have created a ticket for new tool qualification

✅ Checklist

  • Added/updated documentation for new or changed features
  • Added/updated tests to cover the changes
  • Followed project coding standards and guidelines

Validation

  • pre-commit run --files .pre-commit-config.yaml MODULE.bazel MODULE.bazel.lock
  • bazel mod deps --lockfile_mode=error
  • bazel test --lockfile_mode=error //... --build_tests_only (24/25 targets passed; the unrelated //src/helper_lib:helper_lib_tests sees the VPS-wide /tmp/.git and takes the runfiles fallback branch instead of its expected no-git-root branch)

@AlexanderLanin

Copy link
Copy Markdown
Member

@1cbyc thanks for your contribution. Unfortunately you'll need to sign the Eclipse Contributor Agreement in order to contribute anything to the S-CORE project.

I was just looking for proper documentation, and it doesnt seem we have any. But this is a reasonable reference: https://eclipse-score.github.io/score/main/contribute/general/contribution_attribution.html

@AlexanderLanin

Copy link
Copy Markdown
Member

bazel test --lockfile_mode=error //... --build_tests_only (24/25 targets passed; the unrelated //src/helper_lib:helper_lib_tests sees the VPS-wide /tmp/.git and takes the runfiles fallback branch instead of its expected no-git-root branch)

Could you create a separate bug ticket for this

@1cbyc

1cbyc commented Oct 6, 2026

Copy link
Copy Markdown
Contributor Author

Filed #920 with the reproduction and the host-layout assumption isolated. Thanks for pointing it out.

@1cbyc
1cbyc force-pushed the 1cbyc/917-devcontainer-buildifier branch from 72dcf0d to b5f8bb0 Compare October 7, 2026 20:21
@AlexanderLanin AlexanderLanin changed the title Use devcontainer buildifier in pre-commit tests: use devcontainer buildifier in pre-commit Oct 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Documentation preview for this pull request is available at:
pr-919: https://eclipse-score.github.io/docs-as-code/pr-919/

@MaximilianSoerenPollak

Copy link
Copy Markdown
Contributor

@1cbyc does this account have the ECA singed? I see that the other account mentioned in the first commit does not have it.
If that is the case, could you just squash it so only the right account is credited in the commits?

@1cbyc
1cbyc force-pushed the 1cbyc/917-devcontainer-buildifier branch from b3b732b to 6c20a22 Compare October 13, 2026 07:19
@MaximilianSoerenPollak

Copy link
Copy Markdown
Contributor

@1cbyc thanks. I can see that the ECA is signed for the non-reply email but not for the @gmail email.
That seems to be the issue, that some commits are associated with the @gmail email not with the non-reply one that has the ECA.

@1cbyc
1cbyc force-pushed the 1cbyc/917-devcontainer-buildifier branch 3 times, most recently from 1844adc to 6cd330f Compare October 18, 2026 02:33
@MaximilianSoerenPollak

Copy link
Copy Markdown
Contributor

Hi @1cbyc I have had contact with the eclipse customer desk.

Scine you have a no reply email you need to manually link your github username as it can't do it automatically.
Once that is done it should work.
The commits are fine as is :)

@1cbyc
1cbyc force-pushed the 1cbyc/917-devcontainer-buildifier branch from 6cd330f to bdf5a05 Compare October 22, 2026 00:19
@1cbyc
1cbyc force-pushed the 1cbyc/917-devcontainer-buildifier branch from bdf5a05 to 658f873 Compare October 29, 2026 08:55
@1cbyc

1cbyc commented Oct 29, 2026

Copy link
Copy Markdown
Contributor Author

@MaximilianSoerenPollak but i have confirmed ECA. kindly check.

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

No active review issues were identified for the switch to the devcontainer-provided Buildifier.

No open issues 🎉

What changed in this PR

Addresses #917 by moving Bazel and Starlark formatting to the devcontainer-provided Buildifier, aligning pre-commit with the repository’s shared tooling.

Changes:

  • Replaces the bazel mod tidy formatting hook with .devcontainer/run-tool buildifier.
  • Removes the direct buildifier_prebuilt dependency and refreshes the Bazel lockfile.
  • Applies formatting across BUILD files, module fixtures, and Starlark rules without changing their logic.
File Description
tools/​tests/​BUILD Reorders test attributes and dependencies.
src/​tests/​docs_bzl/​scenarios/​subdirectory_bundle/​producer/​BUILD Reorders producer fixture attributes.
src/​tests/​docs_bzl/​scenarios/​subdirectory_bundle/​consumer/​BUILD Reorders consumer fixture attributes.
src/​tests/​docs_bzl/​scenarios/​root_docs_config/​BUILD Reorders documentation fixture attributes.
src/​tests/​docs_bzl/​scenarios/​reference_integration/​modern_module/​docs/​components/​unlinked_component/​BUILD Normalizes bundle and library attribute order.
src/​tests/​docs_bzl/​scenarios/​reference_integration/​modern_module/​docs/​components/​component/​BUILD Reorders bundle attributes.
src/​tests/​docs_bzl/​scenarios/​reference_integration/​modern_module/​BUILD Formats bundle declarations and attribute order.
src/​tests/​docs_bzl/​scenarios/​reference_integration/​legacy_module/​docs/​components/​component/​BUILD Reorders bundle attributes.
src/​tests/​docs_bzl/​scenarios/​reference_integration/​legacy_module/​BUILD Reorders documentation attributes.
src/​tests/​docs_bzl/​scenarios/​nested_bundles/​BUILD Normalizes loads, attributes, and bundle formatting.
src/​tests/​docs_bzl/​scenarios/​invalid_bundle_placements/​BUILD Expands bundle dictionaries and reorders attributes.
src/​tests/​docs_bzl/​scenarios/​external_needs_inputs/​BUILD Reorders documentation attributes.
src/​tests/​docs_bzl/​scenarios/​external_bundle/​BUILD Reorders external-bundle fixture attributes.
src/​tests/​docs_bzl/​scenarios/​deprecated_needs_data/​BUILD Reorders documentation attributes.
src/​tests/​docs_bzl/​scenarios/​data_files_runfiles/​BUILD Formats and repositions bundle declarations.
src/​tests/​docs_bzl/​scenarios/​coverage_summary/​BUILD Expands compact rule and bundle declarations.
src/​tests/​docs_bzl/​scenarios/​basic_docs/​BUILD Reorders basic fixture attributes.
src/​tests/​docs_bzl/​cross_module_fixture/​MODULE.bazel Formats the module declaration across multiple lines.
src/​tests/​docs_bzl/​cross_module_fixture/​BUILD Reorders compatibility fixture attributes.
src/​helper_lib/​BUILD Reorders test attributes.
src/​extensions/​score_sync_toml/​BUILD Normalizes load and test attribute order.
src/​extensions/​score_sphinx_bundle/​BUILD Sorts extension dependencies.
src/​extensions/​score_source_code_linker/​BUILD Sorts sources and reorders test attributes.
src/​extensions/​score_mounts/​BUILD Reorders test attributes.
src/​extensions/​score_metrics/​BUILD Sorts dependencies.
src/​extensions/​score_metamodel/​docs/​BUILD Normalizes loads, attributes, and comment spacing.
src/​extensions/​score_metamodel/​BUILD Sorts dependencies.
src/​docs_cli/​BUILD Formats source lists and reorders test attributes.
src/​BUILD Sorts source labels and reorders requirement-rule attributes.
scripts_bazel/​tests/​BUILD Reorders test attributes.
scripts_bazel/​BUILD Normalizes dependency spacing and attribute order.
MODULE.bazel.lock Refreshes resolution data, retaining transitive Buildifier records.
MODULE.bazel Removes the direct buildifier_prebuilt dependency.
docs.bzl Normalizes indentation, spacing, and trailing commas.
bzl/​tests/​basics_test.bzl Adds formatter-required spacing.
bzl/​needs_rules.bzl Normalizes spacing around comments.
bzl/​mount_rules.bzl Adds spacing before a comment block.
bzl/​code_file_lists.bzl Adds spacing before a comment block.
bzl/​bundle_rules.bzl Normalizes whitespace and continuation indentation.
bzl/​basics.bzl Expands the documentation extension list.
BUILD Reorders root documentation attributes and normalizes spacing.
.pre-commit-config.yaml Runs devcontainer Buildifier on matching filenames.

Review effort: Balanced

@AlexanderLanin AlexanderLanin 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.

Thanks @1cbyc !

@AlexanderLanin
AlexanderLanin merged commit 3794d9b into eclipse-score:main Nov 2, 2026
27 of 32 checks passed
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.

drop buildifier_prebuilt dependency

4 participants