diff --git a/.bazelrc b/.bazelrc index 5fb4945..7af0cad 100644 --- a/.bazelrc +++ b/.bazelrc @@ -9,6 +9,6 @@ common --registry=https://raw.githubusercontent.com/eclipse-score/bazel_registry common --registry=https://bcr.bazel.build # magic logging configuration -common --@score-baselibs//score/mw/log/detail/flags:KUse_Stub_Implementation_Only=False -common --@score-baselibs//score/mw/log/flags:KRemote_Logging=False -common --@score-baselibs//score/json:base_library=nlohmann +common --@score_baselibs//score/mw/log/detail/flags:KUse_Stub_Implementation_Only=False +common --@score_baselibs//score/mw/log/flags:KRemote_Logging=False +common --@score_baselibs//score/json:base_library=nlohmann diff --git a/BUILD b/BUILD index 1d9e33c..7726cd2 100644 --- a/BUILD +++ b/BUILD @@ -10,11 +10,8 @@ # # SPDX-License-Identifier: Apache-2.0 # ******************************************************************************* -load("@score_cr_checker//:cr_checker.bzl", "copyright_checker") -load("@score_dash_license_checker//:dash.bzl", "dash_license_checker") load("@score_docs_as_code//:docs.bzl", "docs") -load("@score_format_checker//:macros.bzl", "use_format_targets") -load("@score_starpls_lsp//:starpls.bzl", "setup_starpls") +load("@score_tooling//:defs.bzl", "copyright_checker", "dash_license_checker", "setup_starpls", "use_format_targets") load("//:project_config.bzl", "PROJECT_CONFIG") setup_starpls( @@ -25,26 +22,32 @@ setup_starpls( copyright_checker( name = "copyright", srcs = [ + ".github", + "docs", "src", "tests", "//:BUILD", "//:MODULE.bazel", + "//:project_config.bzl", ], - config = "@score_cr_checker//resources:config", - template = "@score_cr_checker//resources:templates", - visibility = ["//visibility:public"], -) - -dash_license_checker( - src = "//examples:cargo_lock", - file_type = "", # let it auto-detect based on project_config - project_config = PROJECT_CONFIG, + config = "@score_tooling//cr_checker/resources:config", + template = "@score_tooling//cr_checker/resources:templates", visibility = ["//visibility:public"], ) # Add target for formatting checks use_format_targets() +exports_files([ + "MODULE.bazel", +]) + +# Creates all documentation targets: +# - `:docs` for building documentation at build-time docs( + data = [ + # "@score_platform//:needs_json", + # "@score_process//:needs_json", + ], source_dir = "docs", ) diff --git a/MODULE.bazel b/MODULE.bazel index fa08726..4cebc1c 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -17,6 +17,7 @@ module( ) bazel_dep(name = "rules_python", version = "1.4.1") +bazel_dep(name = "googletest", version = "1.14.0") PYTHON_VERSION = "3.12" @@ -27,17 +28,9 @@ python.toolchain( ) use_repo(python) -# Add GoogleTest dependency -bazel_dep(name = "googletest", version = "1.15.0") - # Rust rules for Bazel bazel_dep(name = "rules_rust", version = "0.61.0") -# Checker rule for CopyRight checks/fixs -bazel_dep(name = "score_cr_checker", version = "0.3.1") -bazel_dep(name = "score_python_basics", version = "0.3.4") -bazel_dep(name = "score_starpls_lsp", version = "0.1.0") - # C/C++ rules for Bazel bazel_dep(name = "rules_cc", version = "0.1.1") @@ -74,22 +67,17 @@ register_toolchains( dev_dependency = True, ) -# Dash license checker -bazel_dep(name = "score_dash_license_checker", version = "0.1.2") - -# Format checker -bazel_dep(name = "score_format_checker", version = "0.1.1") -bazel_dep(name = "aspect_rules_lint", version = "1.4.4") -bazel_dep(name = "buildifier_prebuilt", version = "8.2.0.2") - -#docs-as-code -bazel_dep(name = "score_docs_as_code", version = "1.0.1") +bazel_dep(name = "aspect_rules_lint", version = "1.0.3") +bazel_dep(name = "buildifier_prebuilt", version = "7.3.1") +bazel_dep(name = "score_bazel_platforms", version = "0.0.2") +bazel_dep(name = "score_docs_as_code", version = "2.0.2") +bazel_dep(name = "score_tooling", version = "1.0.4") # Code deps -bazel_dep(name = "score-baselibs", version = "0.1.0") +bazel_dep(name = "score_baselibs", version = "0.2.0") git_override( - module_name = "score-baselibs", - commit = "c2d9b7e872c1e67b69256214a75c937e00d03601", # or use "tag" or "branch" + module_name = "score_baselibs", + commit = "59dba065def85e3c7fb38e08f0d4cb04cc693b2f", remote = "https://github.com/eclipse-score/baselibs.git", ) diff --git a/project_config.bzl b/project_config.bzl index f764a1d..67aee1f 100644 --- a/project_config.bzl +++ b/project_config.bzl @@ -1,3 +1,15 @@ +# ******************************************************************************* +# 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 +# ******************************************************************************* # project_config.bzl PROJECT_CONFIG = { "asil_level": "QM", diff --git a/src/rust/mw_log_subscriber/BUILD b/src/rust/mw_log_subscriber/BUILD index 52b3409..aefb83c 100644 --- a/src/rust/mw_log_subscriber/BUILD +++ b/src/rust/mw_log_subscriber/BUILD @@ -19,7 +19,7 @@ cc_library( srcs = ["src/rust_cpp_log_adapter.cpp"], visibility = ["//visibility:private"], deps = [ - "@score-baselibs//score/mw/log", + "@score_baselibs//score/mw/log", ], ) @@ -31,7 +31,7 @@ rust_library( visibility = ["//visibility:public"], deps = [ ":librust_cpp_log_adapter", - "@score-baselibs//score/mw/log/rust:log", + "@score_baselibs//score/mw/log/rust:log", ], ) @@ -50,6 +50,6 @@ rust_binary( visibility = ["//visibility:public"], deps = [ ":mw_log_subscriber", - "@score-baselibs//score/mw/log/rust:log", + "@score_baselibs//score/mw/log/rust:log", ], ) diff --git a/src/rust/mw_log_subscriber/src/rust_cpp_log_adapter.cpp b/src/rust/mw_log_subscriber/src/rust_cpp_log_adapter.cpp index dc7544a..22ec0ed 100644 --- a/src/rust/mw_log_subscriber/src/rust_cpp_log_adapter.cpp +++ b/src/rust/mw_log_subscriber/src/rust_cpp_log_adapter.cpp @@ -1,15 +1,16 @@ /******************************************************************************** -* 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 -********************************************************************************/ + * 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 + ********************************************************************************/ + #include "score/mw/log/logging.h" #include "score/mw/log/configuration/configuration.h" #include "score/mw/log/logger.h" diff --git a/tests/cpp/test_main.cpp b/tests/cpp/test_main.cpp index f523107..dd5a1d5 100644 --- a/tests/cpp/test_main.cpp +++ b/tests/cpp/test_main.cpp @@ -1,15 +1,16 @@ /******************************************************************************** -* 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 -********************************************************************************/ + * 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 + ********************************************************************************/ + #include // Function to be tested