From 8e715b074b71baacce71b18d63c719544dd04627 Mon Sep 17 00:00:00 2001 From: Lutz Reinhardt Date: Sun, 8 Mar 2026 18:14:34 +0000 Subject: [PATCH 01/14] Run all pre-commit checks in CI --- .github/workflows/pre-commit.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/pre-commit.yml diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml new file mode 100644 index 0000000..0abadf0 --- /dev/null +++ b/.github/workflows/pre-commit.yml @@ -0,0 +1,31 @@ +# ******************************************************************************* +# Copyright (c) 2025 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0 +# +# SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************* + +name: Pull Request Workflow +on: + pull_request: + types: [opened, reopened, synchronize] + +jobs: + self_test: + name: šŸ”¬ Self Test + runs-on: ubuntu-latest + steps: + - name: šŸ“„ Check out + uses: actions/checkout@v6 + + - name: āš™ļø Setup uv + uses: astral-sh/setup-uv@v5 + + - name: šŸ› ļø Run pre-commit + run: uvx pre-commit run --all-files From 1cb169b77c437ccc5775a53a8efe76bb49d0e078 Mon Sep 17 00:00:00 2001 From: Lutz Reinhardt Date: Sun, 8 Mar 2026 18:15:52 +0000 Subject: [PATCH 02/14] better workflow name --- .github/workflows/pre-commit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 0abadf0..601a05b 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -11,7 +11,7 @@ # SPDX-License-Identifier: Apache-2.0 # ******************************************************************************* -name: Pull Request Workflow +name: pre-commit on: pull_request: types: [opened, reopened, synchronize] From b6551c0dd185c56d4aa085d346d1b988bd02af09 Mon Sep 17 00:00:00 2001 From: Lutz Reinhardt Date: Sun, 8 Mar 2026 18:17:01 +0000 Subject: [PATCH 03/14] automated pre-commit fixes --- .github/workflows/pre-commit.yml | 4 -- .github/workflows/tests.yml | 12 ++++++ bazel/rules/rules_score/BUILD | 12 ++++++ bazel/rules/rules_score/docs/index.rst | 13 +++++++ .../rules_score/private/sphinx_module.bzl | 12 ++++++ bazel/rules/rules_score/rules_score.bzl | 12 ++++++ .../rules_score/src/sphinx_html_merge.py | 12 ++++++ bazel/rules/rules_score/src/sphinx_wrapper.py | 12 ++++++ .../templates/seooc_index.template.rst | 13 +++++++ .../test/fixtures/module_a/index.rst | 13 +++++++ .../test/fixtures/module_b/index.rst | 13 +++++++ .../test/fixtures/module_c/index.rst | 13 +++++++ .../seooc_test/architectural_design.rst | 13 +++++++ .../seooc_test/assumptions_of_use.rst | 13 +++++++ .../seooc_test/component_requirements.rst | 13 +++++++ .../seooc_test/dependability_analysis.rst | 13 +++++++ bazel/rules/rules_score/test/seooc_test.bzl | 12 ++++++ cli_helper/README.md | 2 +- coverage/ferrocene_report.sh | 12 ++++++ coverage/llvm_profile_wrapper.sh | 12 ++++++ coverage/scripts/normalize_symbol_report.py | 12 ++++++ coverage/scripts/parse_line_coverage.py | 12 ++++++ coverage/tests/ferrocene_report_help_test.sh | 12 ++++++ coverage/tests/fixtures/blanket_index.html | 2 +- .../tests/normalize_symbol_report_test.sh | 12 ++++++ coverage/tests/parse_line_coverage_test.sh | 12 ++++++ python_basics/score_pytest/README.md | 38 +++++++++---------- starpls/README.md | 8 ++-- 28 files changed, 310 insertions(+), 29 deletions(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 601a05b..0ca1912 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -10,12 +10,10 @@ # # SPDX-License-Identifier: Apache-2.0 # ******************************************************************************* - name: pre-commit on: pull_request: types: [opened, reopened, synchronize] - jobs: self_test: name: šŸ”¬ Self Test @@ -23,9 +21,7 @@ jobs: steps: - name: šŸ“„ Check out uses: actions/checkout@v6 - - name: āš™ļø Setup uv uses: astral-sh/setup-uv@v5 - - name: šŸ› ļø Run pre-commit run: uvx pre-commit run --all-files diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b43c3ec..68a132d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,3 +1,15 @@ +# ******************************************************************************* +# Copyright (c) 2026 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0 +# +# SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************* name: Run Python Basics Integration and Unit Tests on: pull_request: diff --git a/bazel/rules/rules_score/BUILD b/bazel/rules/rules_score/BUILD index 6b53f2f..45dc272 100644 --- a/bazel/rules/rules_score/BUILD +++ b/bazel/rules/rules_score/BUILD @@ -1,3 +1,15 @@ +# ******************************************************************************* +# Copyright (c) 2026 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0 +# +# SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************* load( "//bazel/rules/rules_score:rules_score.bzl", "sphinx_module", diff --git a/bazel/rules/rules_score/docs/index.rst b/bazel/rules/rules_score/docs/index.rst index 79769a4..1bb17cf 100644 --- a/bazel/rules/rules_score/docs/index.rst +++ b/bazel/rules/rules_score/docs/index.rst @@ -1,3 +1,16 @@ +.. + # ******************************************************************************* + # Copyright (c) 2026 Contributors to the Eclipse Foundation + # + # See the NOTICE file(s) distributed with this work for additional + # information regarding copyright ownership. + # + # This program and the accompanying materials are made available under the + # terms of the Apache License Version 2.0 which is available at + # https://www.apache.org/licenses/LICENSE-2.0 + # + # SPDX-License-Identifier: Apache-2.0 + # ******************************************************************************* SCORE Rules for Bazel ===================== diff --git a/bazel/rules/rules_score/private/sphinx_module.bzl b/bazel/rules/rules_score/private/sphinx_module.bzl index 2ab3d29..35d3da2 100644 --- a/bazel/rules/rules_score/private/sphinx_module.bzl +++ b/bazel/rules/rules_score/private/sphinx_module.bzl @@ -1,3 +1,15 @@ +# ******************************************************************************* +# Copyright (c) 2026 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0 +# +# SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************* # ====================================================================================== # Providers # ====================================================================================== diff --git a/bazel/rules/rules_score/rules_score.bzl b/bazel/rules/rules_score/rules_score.bzl index 7084744..648dc09 100644 --- a/bazel/rules/rules_score/rules_score.bzl +++ b/bazel/rules/rules_score/rules_score.bzl @@ -1,3 +1,15 @@ +# ******************************************************************************* +# Copyright (c) 2026 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0 +# +# SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************* load("@rules_python//sphinxdocs:sphinx.bzl", "sphinx_docs") load("@rules_python//sphinxdocs:sphinx_docs_library.bzl", "sphinx_docs_library") load( diff --git a/bazel/rules/rules_score/src/sphinx_html_merge.py b/bazel/rules/rules_score/src/sphinx_html_merge.py index 60dfaa4..730310b 100644 --- a/bazel/rules/rules_score/src/sphinx_html_merge.py +++ b/bazel/rules/rules_score/src/sphinx_html_merge.py @@ -1,4 +1,16 @@ #!/usr/bin/env python3 +# ******************************************************************************* +# Copyright (c) 2026 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0 +# +# SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************* """Merge multiple Sphinx HTML output directories. This script merges Sphinx HTML documentation from multiple modules into a single diff --git a/bazel/rules/rules_score/src/sphinx_wrapper.py b/bazel/rules/rules_score/src/sphinx_wrapper.py index 1376057..e5b2368 100644 --- a/bazel/rules/rules_score/src/sphinx_wrapper.py +++ b/bazel/rules/rules_score/src/sphinx_wrapper.py @@ -1,3 +1,15 @@ +# ******************************************************************************* +# Copyright (c) 2026 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0 +# +# SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************* """ Wrapper script for running Sphinx builds in Bazel environments. diff --git a/bazel/rules/rules_score/templates/seooc_index.template.rst b/bazel/rules/rules_score/templates/seooc_index.template.rst index 5def2dc..b6b4370 100644 --- a/bazel/rules/rules_score/templates/seooc_index.template.rst +++ b/bazel/rules/rules_score/templates/seooc_index.template.rst @@ -1,3 +1,16 @@ +.. + # ******************************************************************************* + # Copyright (c) 2026 Contributors to the Eclipse Foundation + # + # See the NOTICE file(s) distributed with this work for additional + # information regarding copyright ownership. + # + # This program and the accompanying materials are made available under the + # terms of the Apache License Version 2.0 which is available at + # https://www.apache.org/licenses/LICENSE-2.0 + # + # SPDX-License-Identifier: Apache-2.0 + # ******************************************************************************* .. ******************************************************************************* .. Copyright (c) 2025 Contributors to the Eclipse Foundation .. diff --git a/bazel/rules/rules_score/test/fixtures/module_a/index.rst b/bazel/rules/rules_score/test/fixtures/module_a/index.rst index 573ad4b..9525277 100644 --- a/bazel/rules/rules_score/test/fixtures/module_a/index.rst +++ b/bazel/rules/rules_score/test/fixtures/module_a/index.rst @@ -1,3 +1,16 @@ +.. + # ******************************************************************************* + # Copyright (c) 2026 Contributors to the Eclipse Foundation + # + # See the NOTICE file(s) distributed with this work for additional + # information regarding copyright ownership. + # + # This program and the accompanying materials are made available under the + # terms of the Apache License Version 2.0 which is available at + # https://www.apache.org/licenses/LICENSE-2.0 + # + # SPDX-License-Identifier: Apache-2.0 + # ******************************************************************************* Module A Documentation ====================== diff --git a/bazel/rules/rules_score/test/fixtures/module_b/index.rst b/bazel/rules/rules_score/test/fixtures/module_b/index.rst index 3155c10..0db0700 100644 --- a/bazel/rules/rules_score/test/fixtures/module_b/index.rst +++ b/bazel/rules/rules_score/test/fixtures/module_b/index.rst @@ -1,3 +1,16 @@ +.. + # ******************************************************************************* + # Copyright (c) 2026 Contributors to the Eclipse Foundation + # + # See the NOTICE file(s) distributed with this work for additional + # information regarding copyright ownership. + # + # This program and the accompanying materials are made available under the + # terms of the Apache License Version 2.0 which is available at + # https://www.apache.org/licenses/LICENSE-2.0 + # + # SPDX-License-Identifier: Apache-2.0 + # ******************************************************************************* Module B Documentation ====================== diff --git a/bazel/rules/rules_score/test/fixtures/module_c/index.rst b/bazel/rules/rules_score/test/fixtures/module_c/index.rst index b73ae61..4268a9d 100644 --- a/bazel/rules/rules_score/test/fixtures/module_c/index.rst +++ b/bazel/rules/rules_score/test/fixtures/module_c/index.rst @@ -1,3 +1,16 @@ +.. + # ******************************************************************************* + # Copyright (c) 2026 Contributors to the Eclipse Foundation + # + # See the NOTICE file(s) distributed with this work for additional + # information regarding copyright ownership. + # + # This program and the accompanying materials are made available under the + # terms of the Apache License Version 2.0 which is available at + # https://www.apache.org/licenses/LICENSE-2.0 + # + # SPDX-License-Identifier: Apache-2.0 + # ******************************************************************************* Module C Documentation ====================== diff --git a/bazel/rules/rules_score/test/fixtures/seooc_test/architectural_design.rst b/bazel/rules/rules_score/test/fixtures/seooc_test/architectural_design.rst index 02e96f7..1770fe6 100644 --- a/bazel/rules/rules_score/test/fixtures/seooc_test/architectural_design.rst +++ b/bazel/rules/rules_score/test/fixtures/seooc_test/architectural_design.rst @@ -1,3 +1,16 @@ +.. + # ******************************************************************************* + # Copyright (c) 2026 Contributors to the Eclipse Foundation + # + # See the NOTICE file(s) distributed with this work for additional + # information regarding copyright ownership. + # + # This program and the accompanying materials are made available under the + # terms of the Apache License Version 2.0 which is available at + # https://www.apache.org/licenses/LICENSE-2.0 + # + # SPDX-License-Identifier: Apache-2.0 + # ******************************************************************************* Architectural Design ==================== diff --git a/bazel/rules/rules_score/test/fixtures/seooc_test/assumptions_of_use.rst b/bazel/rules/rules_score/test/fixtures/seooc_test/assumptions_of_use.rst index fae172c..6e95110 100644 --- a/bazel/rules/rules_score/test/fixtures/seooc_test/assumptions_of_use.rst +++ b/bazel/rules/rules_score/test/fixtures/seooc_test/assumptions_of_use.rst @@ -1,3 +1,16 @@ +.. + # ******************************************************************************* + # Copyright (c) 2026 Contributors to the Eclipse Foundation + # + # See the NOTICE file(s) distributed with this work for additional + # information regarding copyright ownership. + # + # This program and the accompanying materials are made available under the + # terms of the Apache License Version 2.0 which is available at + # https://www.apache.org/licenses/LICENSE-2.0 + # + # SPDX-License-Identifier: Apache-2.0 + # ******************************************************************************* Assumptions of Use ================== diff --git a/bazel/rules/rules_score/test/fixtures/seooc_test/component_requirements.rst b/bazel/rules/rules_score/test/fixtures/seooc_test/component_requirements.rst index 1d7f90c..6f6561b 100644 --- a/bazel/rules/rules_score/test/fixtures/seooc_test/component_requirements.rst +++ b/bazel/rules/rules_score/test/fixtures/seooc_test/component_requirements.rst @@ -1,3 +1,16 @@ +.. + # ******************************************************************************* + # Copyright (c) 2026 Contributors to the Eclipse Foundation + # + # See the NOTICE file(s) distributed with this work for additional + # information regarding copyright ownership. + # + # This program and the accompanying materials are made available under the + # terms of the Apache License Version 2.0 which is available at + # https://www.apache.org/licenses/LICENSE-2.0 + # + # SPDX-License-Identifier: Apache-2.0 + # ******************************************************************************* Component Requirements ====================== diff --git a/bazel/rules/rules_score/test/fixtures/seooc_test/dependability_analysis.rst b/bazel/rules/rules_score/test/fixtures/seooc_test/dependability_analysis.rst index ea5b518..403f28c 100644 --- a/bazel/rules/rules_score/test/fixtures/seooc_test/dependability_analysis.rst +++ b/bazel/rules/rules_score/test/fixtures/seooc_test/dependability_analysis.rst @@ -1,3 +1,16 @@ +.. + # ******************************************************************************* + # Copyright (c) 2026 Contributors to the Eclipse Foundation + # + # See the NOTICE file(s) distributed with this work for additional + # information regarding copyright ownership. + # + # This program and the accompanying materials are made available under the + # terms of the Apache License Version 2.0 which is available at + # https://www.apache.org/licenses/LICENSE-2.0 + # + # SPDX-License-Identifier: Apache-2.0 + # ******************************************************************************* Safety Analysis =============== diff --git a/bazel/rules/rules_score/test/seooc_test.bzl b/bazel/rules/rules_score/test/seooc_test.bzl index a88a637..b8d16c3 100644 --- a/bazel/rules/rules_score/test/seooc_test.bzl +++ b/bazel/rules/rules_score/test/seooc_test.bzl @@ -1,3 +1,15 @@ +# ******************************************************************************* +# Copyright (c) 2026 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0 +# +# SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************* """ Test suite for dependable_element macro. diff --git a/cli_helper/README.md b/cli_helper/README.md index 443e5c8..0e017e4 100644 --- a/cli_helper/README.md +++ b/cli_helper/README.md @@ -67,7 +67,7 @@ The `cli_help` tag should follow this format: ### Using CLI Helper in Your Project -To integrate the CLI helper into your Bazel-based project, you can use Bazel modules. +To integrate the CLI helper into your Bazel-based project, you can use Bazel modules. Add the following to your `MODULE.bazel`: diff --git a/coverage/ferrocene_report.sh b/coverage/ferrocene_report.sh index 298b665..365b200 100755 --- a/coverage/ferrocene_report.sh +++ b/coverage/ferrocene_report.sh @@ -1,4 +1,16 @@ #!/usr/bin/env bash +# ******************************************************************************* +# Copyright (c) 2026 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0 +# +# SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************* set -euo pipefail usage() { diff --git a/coverage/llvm_profile_wrapper.sh b/coverage/llvm_profile_wrapper.sh index 3887c36..0fd0cfa 100755 --- a/coverage/llvm_profile_wrapper.sh +++ b/coverage/llvm_profile_wrapper.sh @@ -1,4 +1,16 @@ #!/usr/bin/env bash +# ******************************************************************************* +# Copyright (c) 2026 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0 +# +# SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************* set -euo pipefail # Wrapper for Bazel tests: set LLVM_PROFILE_FILE to TEST_UNDECLARED_OUTPUTS_DIR diff --git a/coverage/scripts/normalize_symbol_report.py b/coverage/scripts/normalize_symbol_report.py index b3b653e..646342c 100755 --- a/coverage/scripts/normalize_symbol_report.py +++ b/coverage/scripts/normalize_symbol_report.py @@ -1,4 +1,16 @@ #!/usr/bin/env python3 +# ******************************************************************************* +# Copyright (c) 2026 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0 +# +# SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************* import json import sys from pathlib import Path diff --git a/coverage/scripts/parse_line_coverage.py b/coverage/scripts/parse_line_coverage.py index 1421afd..09271a2 100755 --- a/coverage/scripts/parse_line_coverage.py +++ b/coverage/scripts/parse_line_coverage.py @@ -1,4 +1,16 @@ #!/usr/bin/env python3 +# ******************************************************************************* +# Copyright (c) 2026 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0 +# +# SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************* import re import sys from pathlib import Path diff --git a/coverage/tests/ferrocene_report_help_test.sh b/coverage/tests/ferrocene_report_help_test.sh index d75ca85..9bdfeac 100755 --- a/coverage/tests/ferrocene_report_help_test.sh +++ b/coverage/tests/ferrocene_report_help_test.sh @@ -1,4 +1,16 @@ #!/usr/bin/env bash +# ******************************************************************************* +# Copyright (c) 2026 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0 +# +# SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************* set -euo pipefail script="${TEST_SRCDIR}/${TEST_WORKSPACE}/coverage/ferrocene_report.sh" diff --git a/coverage/tests/fixtures/blanket_index.html b/coverage/tests/fixtures/blanket_index.html index 592e5c2..841e036 100644 --- a/coverage/tests/fixtures/blanket_index.html +++ b/coverage/tests/fixtures/blanket_index.html @@ -284,4 +284,4 @@ // `DOMContentLoaded` has already fired main(); } - \ No newline at end of file + diff --git a/coverage/tests/normalize_symbol_report_test.sh b/coverage/tests/normalize_symbol_report_test.sh index 214c26e..d743137 100755 --- a/coverage/tests/normalize_symbol_report_test.sh +++ b/coverage/tests/normalize_symbol_report_test.sh @@ -1,4 +1,16 @@ #!/usr/bin/env bash +# ******************************************************************************* +# Copyright (c) 2026 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0 +# +# SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************* set -euo pipefail fixture="${TEST_SRCDIR}/${TEST_WORKSPACE}/coverage/tests/fixtures/symbol_report.json" diff --git a/coverage/tests/parse_line_coverage_test.sh b/coverage/tests/parse_line_coverage_test.sh index 352ca6f..eafcb05 100755 --- a/coverage/tests/parse_line_coverage_test.sh +++ b/coverage/tests/parse_line_coverage_test.sh @@ -1,4 +1,16 @@ #!/usr/bin/env bash +# ******************************************************************************* +# Copyright (c) 2026 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0 +# +# SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************* set -euo pipefail fixture="${TEST_SRCDIR}/${TEST_WORKSPACE}/coverage/tests/fixtures/blanket_index.html" diff --git a/python_basics/score_pytest/README.md b/python_basics/score_pytest/README.md index d18d2b6..0a33602 100644 --- a/python_basics/score_pytest/README.md +++ b/python_basics/score_pytest/README.md @@ -6,11 +6,11 @@ This module provides support for running [pytest](https://docs.pytest.org/en/lat ## Features -- **Test Classification**: Categorize tests by type and derivation technique -- **Requirements Traceability**: Link tests to requirement IDs -- **Automatic File/Line Attribution**: Annotates tests with file path and line number -- **JUnit XML Integration**: Exports metadata as `` in test reports -- **Bazel Integration**: Run tests with `score_py_pytest` Bazel rule +- **Test Classification**: Categorize tests by type and derivation technique +- **Requirements Traceability**: Link tests to requirement IDs +- **Automatic File/Line Attribution**: Annotates tests with file path and line number +- **JUnit XML Integration**: Exports metadata as `` in test reports +- **Bazel Integration**: Run tests with `score_py_pytest` Bazel rule --- @@ -71,9 +71,9 @@ def test_user_login(): ### Required Parameters -- `test_type`: Type of test being executed -- `derivation_technique`: Method used to derive the test -- **Either** `partially_verifies` or `fully_verifies`: List of requirement IDs +- `test_type`: Type of test being executed +- `derivation_technique`: Method used to derive the test +- **Either** `partially_verifies` or `fully_verifies`: List of requirement IDs > ?? All decorated tests **must include a docstring**. @@ -83,20 +83,20 @@ def test_user_login(): #### Test Types -- `fault-injection` -- `interface-test` -- `requirements-based` -- `resource-usage` +- `fault-injection` +- `interface-test` +- `requirements-based` +- `resource-usage` #### Derivation Techniques -- `requirements-analysis` -- `design-analysis` -- `boundary-values` -- `equivalence-classes` -- `fuzz-testing` -- `error-guessing` -- `explorative-testing` +- `requirements-analysis` +- `design-analysis` +- `boundary-values` +- `equivalence-classes` +- `fuzz-testing` +- `error-guessing` +- `explorative-testing` --- diff --git a/starpls/README.md b/starpls/README.md index 92c69f4..37c8184 100644 --- a/starpls/README.md +++ b/starpls/README.md @@ -25,7 +25,7 @@ This Bazel module provides a convenient way to integrate the pre-built `starpls` # If using a local path override for testing: # local_path_override( # module_name = "score_starpls_lsp", - # path = "/path/to/your/local/score_starpls_lsp" + # path = "/path/to/your/local/score_starpls_lsp" # ) ``` @@ -35,7 +35,7 @@ This Bazel module provides a convenient way to integrate the pre-built `starpls` load("@score_starpls_lsp//:starpls.bzl", "setup_starpls") setup_starpls( - name = "starpls_server", + name = "starpls_server", visibility = ["//visibility:public"], ) ``` @@ -44,7 +44,7 @@ This Bazel module provides a convenient way to integrate the pre-built `starpls` You can now run the language server directly using Bazel: ```bash - bazel run //starpls_server-- [arguments_for_starpls...] + bazel run //starpls_server-- [arguments_for_starpls...] ``` 4. **Configure your IDE (e.g., VS Code):** @@ -68,4 +68,4 @@ This Bazel module provides a convenient way to integrate the pre-built `starpls` To run the `starpls_test` integration test suite after cleaning the Bazel cache and outputs, execute the following command from the root directory of the `starpls` module: ```bash -bazel clean --expunge && bazel test //integration_tests:starpls_test \ No newline at end of file +bazel clean --expunge && bazel test //integration_tests:starpls_test From f42ab02da0d1031925571c11ccaa73720b9597b5 Mon Sep 17 00:00:00 2001 From: Lutz Reinhardt Date: Sun, 8 Mar 2026 18:19:18 +0000 Subject: [PATCH 04/14] make scripts with shebang executable --- bazel/rules/rules_score/src/sphinx_html_merge.py | 0 coverage/ferrocene_report_wrapper.sh.tpl | 0 tools/sample.sh | 0 3 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 bazel/rules/rules_score/src/sphinx_html_merge.py mode change 100644 => 100755 coverage/ferrocene_report_wrapper.sh.tpl mode change 100644 => 100755 tools/sample.sh diff --git a/bazel/rules/rules_score/src/sphinx_html_merge.py b/bazel/rules/rules_score/src/sphinx_html_merge.py old mode 100644 new mode 100755 diff --git a/coverage/ferrocene_report_wrapper.sh.tpl b/coverage/ferrocene_report_wrapper.sh.tpl old mode 100644 new mode 100755 diff --git a/tools/sample.sh b/tools/sample.sh old mode 100644 new mode 100755 From d0d397cc14f0b4482497e61e97d88b812b7b4640 Mon Sep 17 00:00:00 2001 From: Lutz Reinhardt Date: Sun, 8 Mar 2026 18:20:02 +0000 Subject: [PATCH 05/14] make script executable --- dash/tool/formatters/dash_format_converter.py | 1 + 1 file changed, 1 insertion(+) diff --git a/dash/tool/formatters/dash_format_converter.py b/dash/tool/formatters/dash_format_converter.py index dc131b6..1d5c50a 100755 --- a/dash/tool/formatters/dash_format_converter.py +++ b/dash/tool/formatters/dash_format_converter.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # ******************************************************************************* # Copyright (c) 2024 Contributors to the Eclipse Foundation # From 5b54d545a57e7dcaf53bd6511827268700a8f440 Mon Sep 17 00:00:00 2001 From: Lutz Reinhardt Date: Sun, 8 Mar 2026 18:22:31 +0000 Subject: [PATCH 06/14] exclude already checked in large files --- .pre-commit-config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 479828b..9de5cdc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -22,6 +22,7 @@ repos: - id: check-executables-have-shebangs - id: check-added-large-files args: [--maxkb=50, --enforce-all] # increase or add git lfs if too strict + exclude: org.eclipse.dash.licenses-1.1.0.jar|blanket_index.html - repo: https://github.com/google/yamlfmt rev: 21ca5323a9c87ee37a434e0ca908efc0a89daa07 # v0.21.0 hooks: From 671d4846a6c018eadbe8d36230fa55375e2a9732 Mon Sep 17 00:00:00 2001 From: Lutz Reinhardt Date: Sun, 8 Mar 2026 18:26:26 +0000 Subject: [PATCH 07/14] add license for reuse --- LICENSES/Apache-2.0.txt | 73 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 LICENSES/Apache-2.0.txt diff --git a/LICENSES/Apache-2.0.txt b/LICENSES/Apache-2.0.txt new file mode 100644 index 0000000..137069b --- /dev/null +++ b/LICENSES/Apache-2.0.txt @@ -0,0 +1,73 @@ +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + + (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. + + You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + +To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. From 4e1c2035ce342449ef7a14e644fae9e9f8b68197 Mon Sep 17 00:00:00 2001 From: Lutz Reinhardt Date: Sun, 8 Mar 2026 18:28:45 +0000 Subject: [PATCH 08/14] run reuse annotate with manual fixes --- .bazelrc | 4 ++++ .gitignore | 4 ++++ README.md | 6 ++++++ bazel/rules/rules_score/test/fixtures/mock_lib1.cc | 4 ++++ bazel/rules/rules_score/test/fixtures/mock_lib2.cc | 4 ++++ .../rules_score/test/fixtures/test_component_main.cc | 4 ++++ bazel/rules/rules_score/test/fixtures/test_unit_test.cc | 4 ++++ coverage/README.md | 6 ++++++ coverage/tests/fixtures/blanket_index.html | 6 ++++++ cr_checker/tests/.bazelrc | 4 ++++ dash/README.md | 6 ++++++ format_checker/README.md | 5 +++++ python_basics/.bazelrc | 4 ++++ python_basics/README.md | 6 ++++++ python_basics/integration_tests/.bazelrc | 4 ++++ .../venv-with-extra-requirements/requirements.txt | 4 ++++ python_basics/pyproject.toml | 4 ++++ python_basics/requirements.txt | 4 ++++ python_basics/score_pytest/README.md | 6 ++++++ starpls/README.md | 8 +++++++- starpls/integration_tests/.bazelrc | 4 ++++ tools/README.md | 6 ++++++ 22 files changed, 106 insertions(+), 1 deletion(-) diff --git a/.bazelrc b/.bazelrc index 3a6ddac..0bac34a 100644 --- a/.bazelrc +++ b/.bazelrc @@ -1,3 +1,7 @@ +# Copyright (c) 2026 Contributors to the Eclipse Foundation +# +# SPDX-License-Identifier: Apache-2.0 + common --registry=https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/ common --registry=https://bcr.bazel.build diff --git a/.gitignore b/.gitignore index 49cacb7..3eef22b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ +# Copyright (c) 2026 Contributors to the Eclipse Foundation +# +# SPDX-License-Identifier: Apache-2.0 + bazel-* MODULE.bazel.lock diff --git a/README.md b/README.md index 571b805..b4d336e 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,9 @@ + + # Score Tooling A unified Bazel module containing development tools and utilities for building, testing, and maintaining code quality. diff --git a/bazel/rules/rules_score/test/fixtures/mock_lib1.cc b/bazel/rules/rules_score/test/fixtures/mock_lib1.cc index 599e3c1..1b67724 100644 --- a/bazel/rules/rules_score/test/fixtures/mock_lib1.cc +++ b/bazel/rules/rules_score/test/fixtures/mock_lib1.cc @@ -1,3 +1,7 @@ +// Copyright (c) 2026 Contributors to the Eclipse Foundation +// +// SPDX-License-Identifier: Apache-2.0 + // Mock implementation for testing purposes int mock_function_1() { return 42; diff --git a/bazel/rules/rules_score/test/fixtures/mock_lib2.cc b/bazel/rules/rules_score/test/fixtures/mock_lib2.cc index 588f15d..9fd7d51 100644 --- a/bazel/rules/rules_score/test/fixtures/mock_lib2.cc +++ b/bazel/rules/rules_score/test/fixtures/mock_lib2.cc @@ -1,3 +1,7 @@ +// Copyright (c) 2026 Contributors to the Eclipse Foundation +// +// SPDX-License-Identifier: Apache-2.0 + // Mock implementation for testing purposes int mock_function_2() { return 84; diff --git a/bazel/rules/rules_score/test/fixtures/test_component_main.cc b/bazel/rules/rules_score/test/fixtures/test_component_main.cc index 578f2d5..c95cf56 100644 --- a/bazel/rules/rules_score/test/fixtures/test_component_main.cc +++ b/bazel/rules/rules_score/test/fixtures/test_component_main.cc @@ -1,3 +1,7 @@ +// Copyright (c) 2026 Contributors to the Eclipse Foundation +// +// SPDX-License-Identifier: Apache-2.0 + // Main implementation for test_component #include diff --git a/bazel/rules/rules_score/test/fixtures/test_unit_test.cc b/bazel/rules/rules_score/test/fixtures/test_unit_test.cc index 3420f20..416e839 100644 --- a/bazel/rules/rules_score/test/fixtures/test_unit_test.cc +++ b/bazel/rules/rules_score/test/fixtures/test_unit_test.cc @@ -1,3 +1,7 @@ +// Copyright (c) 2026 Contributors to the Eclipse Foundation +// +// SPDX-License-Identifier: Apache-2.0 + // Unit tests for mock libraries #include diff --git a/coverage/README.md b/coverage/README.md index c25115c..713b9a8 100644 --- a/coverage/README.md +++ b/coverage/README.md @@ -1,3 +1,9 @@ + + # Ferrocene Rust Coverage This directory provides the Ferrocene Rust coverage workflow for Bazel-based diff --git a/coverage/tests/fixtures/blanket_index.html b/coverage/tests/fixtures/blanket_index.html index 841e036..793b2d2 100644 --- a/coverage/tests/fixtures/blanket_index.html +++ b/coverage/tests/fixtures/blanket_index.html @@ -1,3 +1,9 @@ + +