From 683a4bc966bed4c2da1a57bfb1f5e4ee77a9a7e5 Mon Sep 17 00:00:00 2001 From: "rahul.singh" Date: Wed, 25 Mar 2026 07:26:47 +0100 Subject: [PATCH] Adopt clang-tidy support from @score_cpp_policies Fix review comments for clang-tidy PR adoption address review comments on visibility and clang-tidy scope Fix review comments on grpc-java and clang-tidy scope --- .bazelrc | 5 ++ .clang-tidy | 26 ++++++++ .github/workflows/clang_tidy.yml | 44 +++++++++++++ .github/workflows/integration_tests.yml | 6 ++ BUILD | 1 + MODULE.bazel | 28 ++++++-- MODULE.bazel.lock | 64 ++++++++++++------- .../environments/qnx8_qemu/network_setup.sh | 3 + score/mw/log/detail/common/BUILD | 7 +- .../detail/common/helper_functions_test.cpp | 2 - tools/lint/BUILD.bazel | 17 +++++ tools/lint/linters.bzl | 25 ++++++++ 12 files changed, 195 insertions(+), 33 deletions(-) create mode 100644 .clang-tidy create mode 100644 .github/workflows/clang_tidy.yml create mode 100644 tools/lint/BUILD.bazel create mode 100644 tools/lint/linters.bzl diff --git a/.bazelrc b/.bazelrc index d4fa1f02..b90e1ef5 100644 --- a/.bazelrc +++ b/.bazelrc @@ -138,3 +138,8 @@ test:tsan --cxxopt=-O1 test:tsan --test_tag_filters=-no-tsan test:tsan --@score_cpp_policies//sanitizers/flags:sanitizer=tsan test:tsan --run_under=@score_cpp_policies//sanitizers:wrapper + +# Clang-tidy: bazel test --config=clang-tidy //score/... +test:clang-tidy --aspects=//tools/lint:linters.bzl%clang_tidy_aspect +test:clang-tidy --output_groups=+rules_lint_report +test:clang-tidy --extra_toolchains=@llvm_toolchain//:cc-toolchain-x86_64-linux diff --git a/.clang-tidy b/.clang-tidy new file mode 100644 index 00000000..bb8b7bba --- /dev/null +++ b/.clang-tidy @@ -0,0 +1,26 @@ +# ******************************************************************************* +# 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_logging-specific overrides applied on top of the S-CORE baseline. +# Do NOT duplicate baseline checks here; only add local tightenings. + +# Only analyze headers under score_logging's own source tree. +# POSIX ERE-compatible (no lookaheads). Adjust if source paths change. +HeaderFilterRegex: 'score/' + +# Promote additional families to errors as score_logging compliance increases. +# WarningsAsErrors: >- +# clang-analyzer-*, +# bugprone-* + +--- diff --git a/.github/workflows/clang_tidy.yml b/.github/workflows/clang_tidy.yml new file mode 100644 index 00000000..106e4718 --- /dev/null +++ b/.github/workflows/clang_tidy.yml @@ -0,0 +1,44 @@ +# ******************************************************************************* +# 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: Clang-Tidy + +on: + pull_request: + types: [opened, reopened, synchronize] + merge_group: + +permissions: + contents: read + +concurrency: + group: clang-tidy-${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + clang-tidy: + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - uses: actions/checkout@v4 + - name: Setup Bazel + uses: bazel-contrib/setup-bazel@0.15.0 + with: + bazelisk-version: 1.26.0 + disk-cache: clang-tidy + repository-cache: true + external-cache: true + - name: Run clang-tidy + # Scope limited to C++ targets. Rust targets are not yet validated against + # this configuration and are explicitly excluded. + run: bazel test --config=clang-tidy --lockfile_mode=error -- //score/mw/log/... //score/datarouter/... -//score/mw/log/rust/... diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 25c959ba..75c6661e 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -87,6 +87,12 @@ jobs: sudo udevadm control --reload-rules sudo udevadm trigger --name-match=kvm + - name: Setup tap0 network interface for QEMU + run: | + sudo ip tuntap add dev tap0 mode tap user runner + sudo ip link set dev tap0 up + sudo ip addr add 169.254.21.88/16 dev tap0 + - name: Allow unprivileged user namespaces run: | sudo sysctl kernel.apparmor_restrict_unprivileged_userns=0 diff --git a/BUILD b/BUILD index 20272bc9..ec08dc7d 100644 --- a/BUILD +++ b/BUILD @@ -42,6 +42,7 @@ use_format_targets() exports_files([ "MODULE.bazel", + ".clang-tidy", ]) # Creates all documentation targets: diff --git a/MODULE.bazel b/MODULE.bazel index 5eed2f99..2a5be57d 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -21,7 +21,17 @@ bazel_dep(name = "rules_python", version = "1.8.5") bazel_dep(name = "bazel_skylib", version = "1.9.0") bazel_dep(name = "rules_rust", version = "0.68.1-score") bazel_dep(name = "rules_cc", version = "0.2.17") -bazel_dep(name = "aspect_rules_lint", version = "2.3.0") +bazel_dep(name = "aspect_rules_lint", version = "2.5.0") + +bazel_dep(name = "score_cpp_policies", version = "0.0.0", dev_dependency = True) +git_override( + module_name = "score_cpp_policies", + commit = "b6551c217fbb0daf948b493c4ba69eb7fe8359a5", + remote = "https://github.com/eclipse-score/score_cpp_policies.git", +) + +bazel_dep(name = "toolchains_llvm", version = "1.7.0", dev_dependency = True) + bazel_dep(name = "buildifier_prebuilt", version = "8.5.1") bazel_dep(name = "platforms", version = "1.0.0") @@ -79,12 +89,6 @@ use_repo(oci, "ubuntu_24_04", "ubuntu_24_04_linux_amd64") # Toolchains and extensions bazel_dep(name = "score_bazel_cpp_toolchains", version = "0.5.1", dev_dependency = True) bazel_dep(name = "score_toolchains_rust", version = "0.8.0", dev_dependency = True) -bazel_dep(name = "score_cpp_policies", version = "0.0.0", dev_dependency = True) -git_override( - module_name = "score_cpp_policies", - commit = "6348b27", - remote = "https://github.com/eclipse-score/score_cpp_policies.git", -) # S-CORE crates bazel_dep(name = "score_crates", version = "0.0.9") @@ -129,6 +133,16 @@ use_repo( "score_qcc_x86_64_toolchain_pkg", ) +llvm = use_extension( + "@toolchains_llvm//toolchain/extensions:llvm.bzl", + "llvm", + dev_dependency = True, +) +llvm.toolchain( + llvm_version = "19.1.7", +) +use_repo(llvm, "llvm_toolchain") + PYTHON_VERSION = "3.12" python = use_extension("@rules_python//python/extensions:python.bzl", "python", dev_dependency = True) diff --git a/MODULE.bazel.lock b/MODULE.bazel.lock index cfea4c8b..7e4c59cb 100644 --- a/MODULE.bazel.lock +++ b/MODULE.bazel.lock @@ -17,7 +17,6 @@ "https://bcr.bazel.build/modules/abseil-cpp/20250512.1/MODULE.bazel": "d209fdb6f36ffaf61c509fcc81b19e81b411a999a934a032e10cd009a0226215", "https://bcr.bazel.build/modules/abseil-cpp/20250512.1/source.json": "d725d73707d01bb46ab3ca59ba408b8e9bd336642ca77a2269d4bfb8bbfd413d", "https://bcr.bazel.build/modules/ape/1.0.1/MODULE.bazel": "37411cfd13bfc28cd264674d660a3ecb3b5b35b9dbe4c0b2be098683641b3fee", - "https://bcr.bazel.build/modules/ape/1.0.1/source.json": "96bc5909d1e3ccc4203272815ef874dbfd99651e240c05049f12193d16c1110b", "https://bcr.bazel.build/modules/apple_support/1.11.1/MODULE.bazel": "1843d7cd8a58369a444fc6000e7304425fba600ff641592161d9f15b179fb896", "https://bcr.bazel.build/modules/apple_support/1.15.1/MODULE.bazel": "a0556fefca0b1bb2de8567b8827518f94db6a6e7e7d632b4c48dc5f865bc7c85", "https://bcr.bazel.build/modules/apple_support/1.17.1/MODULE.bazel": "655c922ab1209978a94ef6ca7d9d43e940cd97d9c172fb55f94d91ac53f8610b", @@ -50,7 +49,8 @@ "https://bcr.bazel.build/modules/aspect_rules_lint/1.5.3/MODULE.bazel": "7fee71b11be63f1cf0458cd8c731712a0e672d0bb6df8879ed70249bf8dfdfdc", "https://bcr.bazel.build/modules/aspect_rules_lint/2.0.0/MODULE.bazel": "1f4c81edd9af0c54e65dedbe36653fc63dc9a91605313d54d5ab371f853d693c", "https://bcr.bazel.build/modules/aspect_rules_lint/2.3.0/MODULE.bazel": "4d36bce3c1347bb4fed5906877dce0e683cb207f4032711aff32334003bcf835", - "https://bcr.bazel.build/modules/aspect_rules_lint/2.3.0/source.json": "07c6e7333ac089e2428a02d68deb5f90e3947aa9b9ac22c26b9e8b0083122926", + "https://bcr.bazel.build/modules/aspect_rules_lint/2.5.0/MODULE.bazel": "24f49acb3b8375fa138ba6ab53bcf517ae92529770a04ab04d47c958ff47b63e", + "https://bcr.bazel.build/modules/aspect_rules_lint/2.5.0/source.json": "8beadb1db5fa4b5e36769a5247c200a877fbc9f397dc10b5aa33e76099483070", "https://bcr.bazel.build/modules/aspect_rules_py/1.4.0/MODULE.bazel": "6fd29b93207a31445d5d3ab9d9882fd5511e43c95e8e82e7492872663720fd44", "https://bcr.bazel.build/modules/aspect_rules_py/1.4.0/source.json": "fb1ba946478fb6dbb26d49307d756b0fd2ff88be339af23c39c0397d59143d2c", "https://bcr.bazel.build/modules/aspect_rules_ts/3.6.0/MODULE.bazel": "d0045b5eabb012be550a609589b3e5e47eba682344b19cfd9365d4d896ed07df", @@ -76,7 +76,9 @@ "https://bcr.bazel.build/modules/bazel_features/1.30.0/MODULE.bazel": "a14b62d05969a293b80257e72e597c2da7f717e1e69fa8b339703ed6731bec87", "https://bcr.bazel.build/modules/bazel_features/1.32.0/MODULE.bazel": "095d67022a58cb20f7e20e1aefecfa65257a222c18a938e2914fd257b5f1ccdc", "https://bcr.bazel.build/modules/bazel_features/1.34.0/MODULE.bazel": "e8475ad7c8965542e0c7aac8af68eb48c4af904be3d614b6aa6274c092c2ea1e", - "https://bcr.bazel.build/modules/bazel_features/1.34.0/source.json": "dfa5c4b01110313153b484a735764d247fee5624bbab63d25289e43b151a657a", + "https://bcr.bazel.build/modules/bazel_features/1.38.0/MODULE.bazel": "f9b8a9c890ebd216b4049fd12a31d3c2602e3403c7af636b04fbbd7453edc9c9", + "https://bcr.bazel.build/modules/bazel_features/1.39.0/MODULE.bazel": "28739425c1fc283c91931619749c832b555e60bcd1010b40d8441ce0a5cf726d", + "https://bcr.bazel.build/modules/bazel_features/1.39.0/source.json": "f63cbeb4c602098484d57001e5a07d31cb02bbccde9b5e2c9bf0b29d05283e93", "https://bcr.bazel.build/modules/bazel_features/1.4.1/MODULE.bazel": "e45b6bb2350aff3e442ae1111c555e27eac1d915e77775f6fdc4b351b758b5d7", "https://bcr.bazel.build/modules/bazel_features/1.9.0/MODULE.bazel": "885151d58d90d8d9c811eb75e3288c11f850e1d6b481a8c9f766adee4712358b", "https://bcr.bazel.build/modules/bazel_features/1.9.1/MODULE.bazel": "8f679097876a9b609ad1f60249c49d68bfab783dd9be012faf9d82547b14815a", @@ -212,6 +214,8 @@ "https://bcr.bazel.build/modules/curl/8.7.1/source.json": "bf9890e809717445b10a3ddc323b6d25c46631589c693a232df8310a25964484", "https://bcr.bazel.build/modules/cython/3.0.11-1/MODULE.bazel": "868b3f5c956c3657420d2302004c6bb92606bfa47e314bab7f2ba0630c7c966c", "https://bcr.bazel.build/modules/cython/3.0.11-1/source.json": "da318be900b8ca9c3d1018839d3bebc5a8e1645620d0848fa2c696d4ecf7c296", + "https://bcr.bazel.build/modules/diff.bzl/0.5.1/MODULE.bazel": "bad8dd444e512b6fcbcd969d6385cd6bc093d4c12e5640fb1f0ace2282f99ef9", + "https://bcr.bazel.build/modules/diff.bzl/0.5.1/source.json": "64571044143273ff8adb322c0f7acefca36f9589ff37a743e3cac9c35ce6b010", "https://bcr.bazel.build/modules/download_utils/1.0.1/MODULE.bazel": "f1d0afade59e37de978506d6bbf08d7fe5f94964e86944aaf58efcead827b41b", "https://bcr.bazel.build/modules/download_utils/1.2.2/MODULE.bazel": "7d185ec9dd3c5ee277f269e3a8e5f09b9de4cb7ba34d06b93dce9bf41c1279f8", "https://bcr.bazel.build/modules/download_utils/1.2.2/source.json": "c88be2bc48c98371d35665b805f307a647c98c83327345c918d9088822d77928", @@ -255,6 +259,8 @@ "https://bcr.bazel.build/modules/grpc/1.69.0/MODULE.bazel": "4e26e05c9e1ef291ccbc96aad8e457b1b8abedbc141623831629da2f8168eef6", "https://bcr.bazel.build/modules/grpc/1.70.1/MODULE.bazel": "b800cd8e3e7555c1e61cba2e02d3a2fcf0e91f66e800db286d965d3b7a6a721a", "https://bcr.bazel.build/modules/grpc/1.70.1/source.json": "e2977ea6cf9f2755418934d4ae134a6569713dd200fd7aded86a4b7f1b86efc9", + "https://bcr.bazel.build/modules/helly25_bzl/0.3.1/MODULE.bazel": "3a4be20f6fc13be32ad44643b8252ef5af09eee936f1d943cd4fd7867fa92826", + "https://bcr.bazel.build/modules/helly25_bzl/0.3.1/source.json": "b129ab1828492de2c163785bbeb4065c166de52d932524b4317beb5b7f917994", "https://bcr.bazel.build/modules/jq.bzl/0.1.0/MODULE.bazel": "2ce69b1af49952cd4121a9c3055faa679e748ce774c7f1fda9657f936cae902f", "https://bcr.bazel.build/modules/jq.bzl/0.4.0/MODULE.bazel": "a7b39b37589f2b0dad53fd6c1ccaabbdb290330caa920d7ef3e6aad068cd4ab2", "https://bcr.bazel.build/modules/jq.bzl/0.6.0/MODULE.bazel": "26ec5118e66a55fef36f8ea39d6415d55fc966671fe4d61a6b9ef0cd6bc7b6a1", @@ -283,7 +289,8 @@ "https://bcr.bazel.build/modules/opentracing-cpp/1.6.0/MODULE.bazel": "b3925269f63561b8b880ae7cf62ccf81f6ece55b62cd791eda9925147ae116ec", "https://bcr.bazel.build/modules/opentracing-cpp/1.6.0/source.json": "da1cb1add160f5e5074b7272e9db6fd8f1b3336c15032cd0a653af9d2f484aed", "https://bcr.bazel.build/modules/package_metadata/0.0.2/MODULE.bazel": "fb8d25550742674d63d7b250063d4580ca530499f045d70748b1b142081ebb92", - "https://bcr.bazel.build/modules/package_metadata/0.0.2/source.json": "e53a759a72488d2c0576f57491ef2da0cf4aab05ac0997314012495935531b73", + "https://bcr.bazel.build/modules/package_metadata/0.0.6/MODULE.bazel": "341dab6f417197494517d54c8e557c0baee1de7aec83543a4fbefe57900acb7e", + "https://bcr.bazel.build/modules/package_metadata/0.0.6/source.json": "9581d8b22db43550ac75ecc314ee4fa0a33400bfdc77d1317d8af6b18dca7756", "https://bcr.bazel.build/modules/platforms/0.0.10/MODULE.bazel": "8cb8efaf200bdeb2150d93e162c40f388529a25852b332cec879373771e48ed5", "https://bcr.bazel.build/modules/platforms/0.0.11/MODULE.bazel": "0daefc49732e227caa8bfa834d65dc52e8cc18a2faf80df25e8caea151a9413f", "https://bcr.bazel.build/modules/platforms/0.0.4/MODULE.bazel": "9b328e31ee156f53f3c416a64f8491f7eb731742655a47c9eec4703a71644aee", @@ -360,7 +367,6 @@ "https://bcr.bazel.build/modules/rules_cc/0.2.4/MODULE.bazel": "1ff1223dfd24f3ecf8f028446d4a27608aa43c3f41e346d22838a4223980b8cc", "https://bcr.bazel.build/modules/rules_cc/0.2.8/MODULE.bazel": "f1df20f0bf22c28192a794f29b501ee2018fa37a3862a1a2132ae2940a23a642", "https://bcr.bazel.build/modules/rules_diff/1.0.0/MODULE.bazel": "1739509d8db9a6cd7d3584822340d3dfe1f9f27e62462fbca60aa061d88741b2", - "https://bcr.bazel.build/modules/rules_diff/1.0.0/source.json": "fc3824aed007b4db160ffb994036c6e558550857b6634a8e9ccee3e74c659312", "https://bcr.bazel.build/modules/rules_foreign_cc/0.10.1/MODULE.bazel": "b9527010e5fef060af92b6724edb3691970a5b1f76f74b21d39f7d433641be60", "https://bcr.bazel.build/modules/rules_foreign_cc/0.9.0/MODULE.bazel": "c9e8c682bf75b0e7c704166d79b599f93b72cfca5ad7477df596947891feeef6", "https://bcr.bazel.build/modules/rules_fuzzing/0.5.2/MODULE.bazel": "40c97d1144356f52905566c55811f13b299453a14ac7769dfba2ac38192337a8", @@ -422,7 +428,8 @@ "https://bcr.bazel.build/modules/rules_nodejs/6.3.0/MODULE.bazel": "45345e4aba35dd6e4701c1eebf5a4e67af4ed708def9ebcdc6027585b34ee52d", "https://bcr.bazel.build/modules/rules_nodejs/6.3.3/MODULE.bazel": "b66eadebd10f1f1b25f52f95ab5213a57e82c37c3f656fcd9a57ad04d2264ce7", "https://bcr.bazel.build/modules/rules_nodejs/6.5.2/MODULE.bazel": "7f9ea68a0ce6d82905ce9f74e76ab8a8b4531ed4c747018c9d76424ad0b3370d", - "https://bcr.bazel.build/modules/rules_nodejs/6.5.2/source.json": "6a6ca0940914d55c550d1417cad13a56c9900e23f651a762d8ccc5a64adcf661", + "https://bcr.bazel.build/modules/rules_nodejs/6.7.3/MODULE.bazel": "c22a48b2a0dbf05a9dc5f83837bbc24c226c1f6e618de3c3a610044c9f336056", + "https://bcr.bazel.build/modules/rules_nodejs/6.7.3/source.json": "a3f966f4415a8a6545e560ee5449eac95cc633f96429d08e87c87775c72f5e09", "https://bcr.bazel.build/modules/rules_oci/2.2.7/MODULE.bazel": "f6150e4b224d459f7f6523ef65967464ca4efdd266c7fbf2f5a2a51011957e0c", "https://bcr.bazel.build/modules/rules_oci/2.2.7/source.json": "b099f02af330f47f19dc67fc9300ef6e1937a8c86882690db0e7a2fcea8c7f6b", "https://bcr.bazel.build/modules/rules_pkg/0.7.0/MODULE.bazel": "df99f03fc7934a4737122518bb87e667e62d780b610910f0447665a7e2be62dc", @@ -487,10 +494,12 @@ "https://bcr.bazel.build/modules/swift_argument_parser/1.3.1.1/source.json": "32bd87e5f4d7acc57c5b2ff7c325ae3061d5e242c0c4c214ae87e0f1c13e54cb", "https://bcr.bazel.build/modules/tar.bzl/0.2.1/MODULE.bazel": "52d1c00a80a8cc67acbd01649e83d8dd6a9dc426a6c0b754a04fe8c219c76468", "https://bcr.bazel.build/modules/tar.bzl/0.5.1/MODULE.bazel": "7c2eb3dcfc53b0f3d6f9acdfd911ca803eaf92aadf54f8ca6e4c1f3aee288351", + "https://bcr.bazel.build/modules/tar.bzl/0.6.0/MODULE.bazel": "a3584b4edcfafcabd9b0ef9819808f05b372957bbdff41601429d5fd0aac2e7c", "https://bcr.bazel.build/modules/tar.bzl/0.7.0/MODULE.bazel": "cc1acd85da33c80e430b65219a620d54d114628df24a618c3a5fa0b65e988da9", "https://bcr.bazel.build/modules/tar.bzl/0.7.0/source.json": "9becb80306f42d4810bfa16379fb48aad0b01ce5342bc12fe47dcd6af3ac4d7a", "https://bcr.bazel.build/modules/toolchain_utils/1.0.2/MODULE.bazel": "9b8be503a4fcfd3b8b952525bff0869177a5234d5c35dc3e566b9f5ca2f755a1", - "https://bcr.bazel.build/modules/toolchain_utils/1.0.2/source.json": "88769ec576dddacafd8cca4631812cf8eead89f10a29d9405d9f7a553de6bf87", + "https://bcr.bazel.build/modules/toolchains_llvm/1.7.0/MODULE.bazel": "55aca6a8c5b372651f663c5e22faf3664d81165e40074c98fb8a30ee5af83272", + "https://bcr.bazel.build/modules/toolchains_llvm/1.7.0/source.json": "cda5fa1abeab5561e811860222952f6cb9373f34b88c5b3f4417459dca057a6d", "https://bcr.bazel.build/modules/upb/0.0.0-20211020-160625a/MODULE.bazel": "6cced416be2dc5b9c05efd5b997049ba795e5e4e6fafbe1624f4587767638928", "https://bcr.bazel.build/modules/upb/0.0.0-20220923-a547704/MODULE.bazel": "7298990c00040a0e2f121f6c32544bab27d4452f80d9ce51349b1a28f3005c43", "https://bcr.bazel.build/modules/upb/0.0.0-20230516-61a97ef/MODULE.bazel": "c0df5e35ad55e264160417fd0875932ee3c9dda63d9fccace35ac62f45e1b6f9", @@ -551,6 +560,7 @@ "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/aspect_rules_lint/1.5.3/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/aspect_rules_lint/2.0.0/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/aspect_rules_lint/2.3.0/MODULE.bazel": "not found", + "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/aspect_rules_lint/2.5.0/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/aspect_rules_py/1.4.0/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/aspect_rules_ts/3.6.0/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/aspect_tools_telemetry/0.2.5/MODULE.bazel": "not found", @@ -573,6 +583,8 @@ "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/bazel_features/1.30.0/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/bazel_features/1.32.0/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/bazel_features/1.34.0/MODULE.bazel": "not found", + "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/bazel_features/1.38.0/MODULE.bazel": "not found", + "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/bazel_features/1.39.0/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/bazel_features/1.4.1/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/bazel_features/1.9.0/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/bazel_features/1.9.1/MODULE.bazel": "not found", @@ -654,6 +666,7 @@ "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/curl/8.4.0/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/curl/8.7.1/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/cython/3.0.11-1/MODULE.bazel": "not found", + "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/diff.bzl/0.5.1/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/download_utils/1.0.1/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/download_utils/1.2.2/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/envoy_api/0.0.0-20241214-918efc9/MODULE.bazel": "not found", @@ -686,6 +699,7 @@ "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/grpc/1.66.0.bcr.3/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/grpc/1.69.0/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/grpc/1.70.1/MODULE.bazel": "not found", + "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/helly25_bzl/0.3.1/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/jq.bzl/0.1.0/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/jq.bzl/0.4.0/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/jq.bzl/0.6.0/MODULE.bazel": "not found", @@ -704,6 +718,7 @@ "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/opentelemetry-proto/1.4.0.bcr.1/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/opentracing-cpp/1.6.0/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/package_metadata/0.0.2/MODULE.bazel": "not found", + "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/package_metadata/0.0.6/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/platforms/0.0.10/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/platforms/0.0.11/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/platforms/0.0.4/MODULE.bazel": "not found", @@ -822,6 +837,7 @@ "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/rules_nodejs/6.3.0/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/rules_nodejs/6.3.3/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/rules_nodejs/6.5.2/MODULE.bazel": "not found", + "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/rules_nodejs/6.7.3/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/rules_oci/2.2.7/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/rules_pkg/0.7.0/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/rules_pkg/1.0.1/MODULE.bazel": "not found", @@ -916,8 +932,10 @@ "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/swift_argument_parser/1.3.1.1/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/tar.bzl/0.2.1/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/tar.bzl/0.5.1/MODULE.bazel": "not found", + "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/tar.bzl/0.6.0/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/tar.bzl/0.7.0/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/toolchain_utils/1.0.2/MODULE.bazel": "not found", + "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/toolchains_llvm/1.7.0/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/upb/0.0.0-20211020-160625a/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/upb/0.0.0-20220923-a547704/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/upb/0.0.0-20230516-61a97ef/MODULE.bazel": "not found", @@ -1114,7 +1132,7 @@ }, "@@aspect_rules_js+//npm:extensions.bzl%pnpm": { "general": { - "bzlTransitiveDigest": "GgxW3BLV2p6mSqTolWNSDHKAM8kGpmaO78clV2gmEmc=", + "bzlTransitiveDigest": "qBGv9LZw2WfNq0dN8ORFm79mDDoVa2DfPl27/F7LQjg=", "usagesDigest": "kbjSw2REjlSC0HtTZDf2p+l/dmiMt3NHLoiWEXYAoQI=", "recordedFileInputs": {}, "recordedDirentsInputs": {}, @@ -1365,7 +1383,7 @@ "@@aspect_tools_telemetry+//:extension.bzl%telemetry": { "general": { "bzlTransitiveDigest": "gA7tPEdJXhskzPIEUxjX9IdDrM6+WjfbgXJ8Ez47umk=", - "usagesDigest": "z8cWWnVpO8J/dzJXjYbJOFOppzxrQWI6B21RNkSjQI4=", + "usagesDigest": "Qe1lA0prPNt87OXoXq3fzmffG9RmcuqdmLdwKVAOUnc=", "recordedFileInputs": {}, "recordedDirentsInputs": {}, "envVariables": {}, @@ -1374,7 +1392,7 @@ "repoRuleId": "@@aspect_tools_telemetry+//:extension.bzl%tel_repository", "attributes": { "deps": { - "aspect_rules_lint": "2.3.0", + "aspect_rules_lint": "2.5.0", "aspect_tools_telemetry": "0.2.8" } } @@ -2134,8 +2152,8 @@ }, "@@rules_nodejs+//nodejs:extensions.bzl%node": { "general": { - "bzlTransitiveDigest": "FmfMiNXAxRoLWw3NloQbssosE1egrSvzirbQnso7j7E=", - "usagesDigest": "wOiX5pSSli1W+0Ahr7t2b6xaVFBTbHGPGTzmq4oN4is=", + "bzlTransitiveDigest": "4pUxCNc22K4I+6+4Nxu52Hur12tFRfa1JMsN5mdDv60=", + "usagesDigest": "jIFY69Ic9kSGWvgZZb9C6A/TAL6LI6yqBqId/Hab5r0=", "recordedFileInputs": {}, "recordedDirentsInputs": {}, "envVariables": {}, @@ -2148,7 +2166,7 @@ "node_urls": [ "https://nodejs.org/dist/v{version}/{filename}" ], - "node_version": "20.19.5", + "node_version": "22.22.0", "include_headers": false, "platform": "linux_amd64" } @@ -2161,7 +2179,7 @@ "node_urls": [ "https://nodejs.org/dist/v{version}/{filename}" ], - "node_version": "20.19.5", + "node_version": "22.22.0", "include_headers": false, "platform": "linux_arm64" } @@ -2174,7 +2192,7 @@ "node_urls": [ "https://nodejs.org/dist/v{version}/{filename}" ], - "node_version": "20.19.5", + "node_version": "22.22.0", "include_headers": false, "platform": "linux_s390x" } @@ -2187,7 +2205,7 @@ "node_urls": [ "https://nodejs.org/dist/v{version}/{filename}" ], - "node_version": "20.19.5", + "node_version": "22.22.0", "include_headers": false, "platform": "linux_ppc64le" } @@ -2200,7 +2218,7 @@ "node_urls": [ "https://nodejs.org/dist/v{version}/{filename}" ], - "node_version": "20.19.5", + "node_version": "22.22.0", "include_headers": false, "platform": "darwin_amd64" } @@ -2213,7 +2231,7 @@ "node_urls": [ "https://nodejs.org/dist/v{version}/{filename}" ], - "node_version": "20.19.5", + "node_version": "22.22.0", "include_headers": false, "platform": "darwin_arm64" } @@ -2226,7 +2244,7 @@ "node_urls": [ "https://nodejs.org/dist/v{version}/{filename}" ], - "node_version": "20.19.5", + "node_version": "22.22.0", "include_headers": false, "platform": "windows_amd64" } @@ -2239,7 +2257,7 @@ "node_urls": [ "https://nodejs.org/dist/v{version}/{filename}" ], - "node_version": "20.19.5", + "node_version": "22.22.0", "include_headers": false, "platform": "windows_arm64" } @@ -2268,7 +2286,7 @@ }, "@@rules_oci+//oci:extensions.bzl%oci": { "general": { - "bzlTransitiveDigest": "kH8yGTr0UMGNfLvOd8gBxVC/iY5HHeVuhIZfOyZpCSU=", + "bzlTransitiveDigest": "fXmxlqWU/asq5w57ESS38ff8DWrbouqrGRB//yxXhv8=", "usagesDigest": "sRVlTEOffP1bFxYjWmpA8p+LdvK9HarT6DEnX61AroE=", "recordedFileInputs": {}, "recordedDirentsInputs": {}, @@ -2733,7 +2751,7 @@ }, "@@rules_rust+//crate_universe:extensions.bzl%crate": { "general": { - "bzlTransitiveDigest": "6Nw0H7ATqIf36Etfdd4e//TEN17cRa7f6R3mv4RbeNI=", + "bzlTransitiveDigest": "b95Ny/NdoRbDEP4UvWyRbnrE3nG/EiDb4CuhbHgl/sk=", "usagesDigest": "yVBEzHUGUuru6KdToFHIq5cnmgm2NBhQAJGR6h53rfc=", "recordedFileInputs": {}, "recordedDirentsInputs": {}, @@ -8219,7 +8237,7 @@ }, "@@rules_rust+//crate_universe/private:internal_extensions.bzl%cu_nr": { "general": { - "bzlTransitiveDigest": "fOGs3LT6z5grPbwThSEU2pAf2hsFP74bS0ZOXRZEOU4=", + "bzlTransitiveDigest": "FVsb0t5qnPo/Pi4gPtKHnt0SbzQE5cNhmy6nD064EYo=", "usagesDigest": "10qWRrPYM+vySc8dX7h/IfhuDlEi1kSxRX4NRxICRFY=", "recordedFileInputs": {}, "recordedDirentsInputs": {}, diff --git a/quality/integration_testing/environments/qnx8_qemu/network_setup.sh b/quality/integration_testing/environments/qnx8_qemu/network_setup.sh index 194d0a74..2569d716 100644 --- a/quality/integration_testing/environments/qnx8_qemu/network_setup.sh +++ b/quality/integration_testing/environments/qnx8_qemu/network_setup.sh @@ -30,3 +30,6 @@ ifconfig vtnet0 169.254.158.190 netmask 255.255.0.0 sysctl -w net.inet.icmp.bmcastecho=1 > /dev/null sysctl -w qnx.sec.droproot=33:33 > /dev/null + +echo "---> Adding multicast route for DLT UDP" +route add -net 224.0.0.0 -netmask 240.0.0.0 -interface vtnet0 diff --git a/score/mw/log/detail/common/BUILD b/score/mw/log/detail/common/BUILD index 6afbdd14..2af6e7d8 100644 --- a/score/mw/log/detail/common/BUILD +++ b/score/mw/log/detail/common/BUILD @@ -190,10 +190,15 @@ cc_test( srcs = [ "@score_baselibs//score/mw/log:log_stream_test.cpp", ], + # FIXME: To be removed after https://github.com/eclipse-score/score_cpp_policies/issues/8 is resolved + copts = ["-Wno-deprecated-declarations"], # src from @score_baselibs uses deprecated APIs features = COMPILER_WARNING_FEATURES + [ "aborts_upon_exception", ], - tags = ["unit"], + tags = [ + "no-clang-tidy", # src from @score_baselibs, cannot suppress deprecations in source + "unit", + ], deps = [ "@googletest//:gtest_main", "@score_baselibs//score/mw/log:console", diff --git a/score/mw/log/detail/common/helper_functions_test.cpp b/score/mw/log/detail/common/helper_functions_test.cpp index c5c761ac..afa9398d 100644 --- a/score/mw/log/detail/common/helper_functions_test.cpp +++ b/score/mw/log/detail/common/helper_functions_test.cpp @@ -11,7 +11,6 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ #include "score/mw/log/detail/common/helper_functions.h" -#include #include "gtest/gtest.h" @@ -20,7 +19,6 @@ namespace helper using testing::Types; TEST(SumTest, SumNoOverflow) { - std::numeric_limits::max(); const std::size_t expected_value = 6U; std::size_t result = Sum(1U, 2U, 3U); EXPECT_EQ(result, expected_value); diff --git a/tools/lint/BUILD.bazel b/tools/lint/BUILD.bazel new file mode 100644 index 00000000..6119afe8 --- /dev/null +++ b/tools/lint/BUILD.bazel @@ -0,0 +1,17 @@ +# ******************************************************************************* +# 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 +# ******************************************************************************* + +exports_files( + ["linters.bzl"], + visibility = ["//tools/lint:__pkg__"], +) diff --git a/tools/lint/linters.bzl b/tools/lint/linters.bzl new file mode 100644 index 00000000..f8955308 --- /dev/null +++ b/tools/lint/linters.bzl @@ -0,0 +1,25 @@ +# ******************************************************************************* +# 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 +# ******************************************************************************* + +"""Clang-tidy linter configuration for score_logging.""" + +load("@score_cpp_policies//clang_tidy:defs.bzl", "make_clang_tidy_aspect", "make_clang_tidy_test") + +clang_tidy_aspect = make_clang_tidy_aspect( + binary = Label("@llvm_toolchain//:clang-tidy"), + # Local .clang-tidy adds score_logging-specific tightenings on top of + # the S-CORE baseline that make_clang_tidy_aspect pre-wires automatically. + local_configs = [Label("//:.clang-tidy")], +) + +clang_tidy_test = make_clang_tidy_test(aspect = clang_tidy_aspect)