Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -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
29 changes: 16 additions & 13 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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",
)
30 changes: 9 additions & 21 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -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")

Expand Down Expand Up @@ -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",
)

Expand Down
12 changes: 12 additions & 0 deletions project_config.bzl
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
6 changes: 3 additions & 3 deletions src/rust/mw_log_subscriber/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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",
],
)

Expand All @@ -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",
],
)

Expand All @@ -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",
],
)
23 changes: 12 additions & 11 deletions src/rust/mw_log_subscriber/src/rust_cpp_log_adapter.cpp
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
23 changes: 12 additions & 11 deletions tests/cpp/test_main.cpp
Original file line number Diff line number Diff line change
@@ -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 <gtest/gtest.h>

// Function to be tested
Expand Down
Loading