diff --git a/.bazelrc b/.bazelrc index 5a5d828..01b2f50 100644 --- a/.bazelrc +++ b/.bazelrc @@ -11,6 +11,11 @@ common --//score/config_management/config_daemon/code:score_variant=True common --registry=https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/ common --registry=https://bcr.bazel.build +# Host GCC toolchain — used by CI (tests.yml, static-analysis.yml) +# score_bazel_cpp_toolchains gcc module extension generates @score_gcc_x86_64_toolchain +build:host_gcc --extra_toolchains=@score_gcc_x86_64_toolchain//:x86_64-linux-gcc_12.2.0 +build:host_gcc --host_platform=@score_bazel_platforms//:x86_64-linux + # score_baselibs deprecated StringLiteral but still uses it in many headers # (string_comparison_adaptor.h, text_format.h, etc.). These headers are included # transitively by our own code, so the -Werror,-Wdeprecated-declarations error diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index ff063c4..ef64910 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,15 +1,8 @@ -# Comment out as not in score yet -# * @eclipse-score/infrastructure-tooling-community -# .* @eclipse-score/infrastructure-tooling-community -# .github/CODEOWNERS @eclipse-score/technical-lead +# 👋 Code owners help maintain this repository and keep it aligned with our technical vision. +# You're responsible for reviewing changes, ensuring quality, and guiding contributors. +# For more information about CODEOWNERS, see: +# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners -# in separate repositories: -# -# /docs @eclipse-score/process-community -# /docs/manual @eclipse-score//safety-manager -# /docs/release @eclipse-score//quality-manager @eclipse-score//module-lead -# /docs/safety_plan @eclipse-score//safety-manager @eclipse-score//module-lead -# /docs/safety_analysis @eclipse-score//safety-manager -# /docs/verification @eclipse-score//quality-manager @eclipse-score//safety-manager -# /components @eclipse-score//technical-lead -# /components/*/ @eclipse-score//automotive-score-committers +# As we cannot use groups yet, we list all members explicitly. +# Default owners for everything in the repository +* @antonkri @castler @LittleHuba @ramceb @michaelsaborov diff --git a/MODULE.bazel b/MODULE.bazel index 55e13d1..a76c353 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -50,6 +50,20 @@ use_repo(llvm, "llvm_toolchain_llvm") register_toolchains("@llvm_toolchain//:all") +# Score C++ toolchain — used for --config=host_gcc in CI (tests, static-analysis) +bazel_dep(name = "score_bazel_platforms", version = "0.1.2") +bazel_dep(name = "score_bazel_cpp_toolchains", version = "0.5.1") + +gcc = use_extension("@score_bazel_cpp_toolchains//extensions:gcc.bzl", "gcc") +gcc.toolchain( + name = "score_gcc_x86_64_toolchain", + target_cpu = "x86_64", + target_os = "linux", + use_default_package = True, + version = "12.2.0", +) +use_repo(gcc, "score_gcc_x86_64_toolchain") + # tooling bazel_dep(name = "score_tooling", version = "1.2.0") bazel_dep(name = "aspect_rules_lint", version = "2.0.0") @@ -63,7 +77,7 @@ single_version_override( ) #docs-as-code -bazel_dep(name = "score_docs_as_code", version = "4.0.3") +bazel_dep(name = "score_docs_as_code", version = "4.6.0") # s-core base libs bazel_dep(name = "score_baselibs", version = "0.2.7") diff --git a/MODULE.bazel.lock b/MODULE.bazel.lock index 1ad945d..a0b385d 100644 --- a/MODULE.bazel.lock +++ b/MODULE.bazel.lock @@ -54,7 +54,8 @@ "https://bcr.bazel.build/modules/aspect_rules_lint/1.4.4/MODULE.bazel": "24459eeeeb084bc3e7628c338e494746718bc17b3a3cbd94415c8df5c7c6dc37", "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.0.0/source.json": "3c3a55b5b424100feca2fd656dcdcd8a0c9fd3304ce609ce71a4d6d46d00a03c", + "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_py/1.0.0/MODULE.bazel": "8eb29876512d3242af50a424300bec5c5f8957b455963df5f618cb7fd4e8ae19", "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", @@ -203,7 +204,8 @@ "https://bcr.bazel.build/modules/buildifier_prebuilt/6.4.0/MODULE.bazel": "37389c6b5a40c59410b4226d3bb54b08637f393d66e2fa57925c6fcf68e64bf4", "https://bcr.bazel.build/modules/buildifier_prebuilt/7.3.1/MODULE.bazel": "537faf0ad9f5892910074b8e43b4c91c96f1d5d86b6ed04bdbe40cf68aa48b68", "https://bcr.bazel.build/modules/buildifier_prebuilt/8.2.0.2/MODULE.bazel": "a9b689711d5b69f9db741649b218c119b9fdf82924ba390415037e09798edd03", - "https://bcr.bazel.build/modules/buildifier_prebuilt/8.2.0.2/source.json": "51eb0a4b38aaaeab7fa64361576d616c4d8bfd0f17a0a10184aeab7084d79f8e", + "https://bcr.bazel.build/modules/buildifier_prebuilt/8.5.1/MODULE.bazel": "77f2a1958d1d07376dd3ce3ae16540f2c1b01921c1fd21930827271260e75a66", + "https://bcr.bazel.build/modules/buildifier_prebuilt/8.5.1/source.json": "ae9f3d9dc7bec033976cf47165a78788bebad2b5c272241063ae31bad8664fd4", "https://bcr.bazel.build/modules/buildozer/7.1.2/MODULE.bazel": "2e8dd40ede9c454042645fd8d8d0cd1527966aa5c919de86661e62953cd73d84", "https://bcr.bazel.build/modules/buildozer/7.1.2/source.json": "c9028a501d2db85793a6996205c8de120944f50a0d570438fcae0457a5f9d1f8", "https://bcr.bazel.build/modules/c-ares/1.15.0/MODULE.bazel": "ba0a78360fdc83f02f437a9e7df0532ad1fbaa59b722f6e715c11effebaa0166", @@ -264,7 +266,8 @@ "https://bcr.bazel.build/modules/grpc/1.70.1/source.json": "e2977ea6cf9f2755418934d4ae134a6569713dd200fd7aded86a4b7f1b86efc9", "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.4.0/source.json": "52ec7530c4618e03f634b30ff719814a68d7d39c235938b7aa2abbfe1eb1c52c", + "https://bcr.bazel.build/modules/jq.bzl/0.6.0/MODULE.bazel": "26ec5118e66a55fef36f8ea39d6415d55fc966671fe4d61a6b9ef0cd6bc7b6a1", + "https://bcr.bazel.build/modules/jq.bzl/0.6.0/source.json": "2ed4e35b9fa9505495784114f7637fbde5846ec14af917841b6c045d877f20eb", "https://bcr.bazel.build/modules/jsoncpp/1.9.5/MODULE.bazel": "31271aedc59e815656f5736f282bb7509a97c7ecb43e927ac1a37966e0578075", "https://bcr.bazel.build/modules/jsoncpp/1.9.5/source.json": "4108ee5085dd2885a341c7fab149429db457b3169b86eb081fa245eadf69169d", "https://bcr.bazel.build/modules/libpfm/4.11.0.bcr.1/MODULE.bazel": "e5362dadc90aab6724c83a2cc1e67cbed9c89a05d97fb1f90053c8deb1e445c8", @@ -429,9 +432,10 @@ "https://bcr.bazel.build/modules/rules_multirun/0.9.0/source.json": "e882ba77962fa6c5fe68619e5c7d0374ec9a219fb8d03c42eadaf6d0243771bd", "https://bcr.bazel.build/modules/rules_multitool/0.11.0/MODULE.bazel": "8d9dda78d2398e136300d3ef4fbcc89ede7c32c158d8c016fa7d032df41c4aaf", "https://bcr.bazel.build/modules/rules_multitool/0.4.0/MODULE.bazel": "15517987d5c00c9e7faab41fbe22ee67a350b6eabcc1e08baded5c6d9025897f", + "https://bcr.bazel.build/modules/rules_multitool/1.11.1/MODULE.bazel": "f826d2d394e8d964e44ebb4a75ebcfe4e9cd4eb150e2ddcd60398ffeb939696a", + "https://bcr.bazel.build/modules/rules_multitool/1.11.1/source.json": "201f43de1d35bd17f25a4fed3ba5a2ec500ef5e08b7d4b341bb9fd39cef0cbc6", "https://bcr.bazel.build/modules/rules_multitool/1.2.0/MODULE.bazel": "8d818d6104f4030930291bbbbc5684702c237dbcdee7229097543e6a6035adaa", "https://bcr.bazel.build/modules/rules_multitool/1.9.0/MODULE.bazel": "8a042b0dbf35e4aaa94c28ad69efa75c9e673e9ea4bd5c0fb70bab75ef9c636b", - "https://bcr.bazel.build/modules/rules_multitool/1.9.0/source.json": "d9a01604a8b5c4a0e9430824dd34ca5b1b3f5b25277b755e8f3ae91f2c9362a3", "https://bcr.bazel.build/modules/rules_nodejs/5.8.2/MODULE.bazel": "6bc03c8f37f69401b888023bf511cb6ee4781433b0cb56236b2e55a21e3a026a", "https://bcr.bazel.build/modules/rules_nodejs/6.2.0/MODULE.bazel": "ec27907f55eb34705adb4e8257952162a2d4c3ed0f0b3b4c3c1aad1fac7be35e", "https://bcr.bazel.build/modules/rules_nodejs/6.3.0/MODULE.bazel": "45345e4aba35dd6e4701c1eebf5a4e67af4ed708def9ebcdc6027585b34ee52d", @@ -575,6 +579,7 @@ "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/aspect_rules_lint/1.4.4/MODULE.bazel": "not found", "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_py/1.0.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", @@ -672,6 +677,7 @@ "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/buildifier_prebuilt/6.4.0/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/buildifier_prebuilt/7.3.1/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/buildifier_prebuilt/8.2.0.2/MODULE.bazel": "not found", + "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/buildifier_prebuilt/8.5.1/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/buildozer/7.1.2/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/c-ares/1.15.0/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/cel-spec/0.15.0/MODULE.bazel": "not found", @@ -715,6 +721,7 @@ "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/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", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/jsoncpp/1.9.5/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/libpfm/4.11.0.bcr.1/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/libpfm/4.11.0/MODULE.bazel": "not found", @@ -849,6 +856,7 @@ "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/rules_multirun/0.9.0/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/rules_multitool/0.11.0/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/rules_multitool/0.4.0/MODULE.bazel": "not found", + "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/rules_multitool/1.11.1/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/rules_multitool/1.2.0/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/rules_multitool/1.9.0/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/rules_nodejs/5.8.2/MODULE.bazel": "not found", @@ -906,7 +914,10 @@ "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_baselibs_rust/0.1.0/MODULE.bazel": "e9f8781fa23b58a7c4815d662d82a9a472d8dddc306f08cba3853928f3b760fe", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_baselibs_rust/0.1.2/MODULE.bazel": "8a07e1c62986e941a6e182e39c9cd08391849eed55c2f4dbb02d72ef6f524346", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_baselibs_rust/0.1.2/source.json": "5d920b55b98cf3d87da75d5a3ab1915709867fda14991ef2843c5e7c33aa0391", + "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_bazel_cpp_toolchains/0.5.1/MODULE.bazel": "c92d6f92b79fc96c4d9f033af21d65a0f8ce714da387da61160111e3b3babd25", + "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_bazel_cpp_toolchains/0.5.1/source.json": "e3bb1beaf9e8e08fe682a616647d17badb1d7f8eeed4d2582277a9d7a1186c62", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_bazel_platforms/0.0.4/MODULE.bazel": "57dce05e4eb4ac25250d67e47caef99f4cbaedf38083de26aa53979ee6a3ae4b", + "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_bazel_platforms/0.1.1/MODULE.bazel": "236e5bdff6f2d6de6f96cc4f5f4b1bf2cd6137547ce279668a2dd4c54cd4236c", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_bazel_platforms/0.1.2/MODULE.bazel": "d1889bf36241521c5d5c401aaf1e98242a60f9cab9d223f8190e5d7087956e83", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_bazel_platforms/0.1.2/source.json": "549c18a968c1ab76135ad38fd15981fcc04d377a62f20e2e5e0b5faa9de2b01d", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_communication/0.2.1/MODULE.bazel": "4f9e3ac5a12e510412025dc0860bf56c2a186c4e9c4f7144c8fd425aca492bbf", @@ -918,6 +929,8 @@ "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_crates/0.0.9/MODULE.bazel": "8f581e0a658a6dab149f381d783443cb00b559f4e9623956f8ff3de06108c550", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_crates/0.0.9/source.json": "58f24336e5e21d53551c0f0d304b0efa318eca031d296f33b998996c73573ce3", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_dash_license_checker/0.1.1/MODULE.bazel": "76681dbd2d45b5c540869a2337174086c56c54953aab1d02cd878b59d31d13a5", + "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_devcontainer/1.7.0/MODULE.bazel": "f9a5971fbd05f0ed14e7a373dbf58af72a5c58d081537a75c314daaf61c92ae9", + "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_devcontainer/1.7.0/source.json": "a3f55522fd9f63fae7a92f3cb5f91c25ae7474a39e9f9c633f0cf797fc0ca8e5", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_docs_as_code/0.2.4/MODULE.bazel": "ea4801e96c87e2b8650a0fa9e5fed9b8bdbef05c1bc3e30003ba527d5af60a43", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_docs_as_code/0.2.6/MODULE.bazel": "1af2963e91c6472555e222f0aba3dc2f5492d04598298209a361978ee3e321e3", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_docs_as_code/0.3.3/MODULE.bazel": "95d2b7d44d461c1cf9bd016605f740716fd4ea1303f5f2ed93de3566b90feb1b", @@ -934,7 +947,9 @@ "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_docs_as_code/4.0.0/MODULE.bazel": "522dc070354e6be2f984468a4243fe4ab8bec690922df5f31f7f0916ee264e20", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_docs_as_code/4.0.1/MODULE.bazel": "5955f4cf37228a9cdda7f6009b81db0446f005c618f4bc43665bfa45f2673ebc", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_docs_as_code/4.0.3/MODULE.bazel": "ad24df8df93882297e36ecaa39a94a69eed68aeb5bb1614e85296d001d5e3c03", - "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_docs_as_code/4.0.3/source.json": "b57557fbde8c66b870dc680f726df9074a734beec2ae9d79aca65127de5e1c42", + "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_docs_as_code/4.5.0/MODULE.bazel": "4cfe52fe8b8dbeaf7e87500036391da278f72f1c2b41b689ffdd4337196dd8fe", + "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_docs_as_code/4.6.0/MODULE.bazel": "d5fbfed7b9bd65f10830e2290045dea639a8cfcaf9f9f0f7a1b12888c14e7d2b", + "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_docs_as_code/4.6.0/source.json": "a24b2bbb23817086971252bffc739c23a3db5d0d2546b0c775940dc0d5061068", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_format_checker/0.1.1/MODULE.bazel": "1acc254faa90e9f97b79ac69af25b6c21c561f8d6079914f6352b9b20d26bd37", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_lifecycle_health/0.2.0/MODULE.bazel": "a8cd3afc35e04172175acdc9aa82e3844f8ab8ed370712d9e3b4d0210ae1ccf9", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_lifecycle_health/0.2.0/source.json": "194330f4b3767ed21628e5c9c122551f28b776df18650005221866fa6860a1a8", @@ -957,7 +972,8 @@ "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_process/1.5.2/MODULE.bazel": "be52d29278d6671221f28921e8f1acfce29c3bfc3e6b4f503f0625ab2c61586f", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_process/1.5.3/MODULE.bazel": "65024b7f23ce5f72bd6ffd455a67c042ecf56d267f0bf63a90330a3241781b7a", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_process/1.5.4/MODULE.bazel": "efd56704f1a93e670032e7c0e4fad97669aa3b348fb1a4cd40f67e4dd4c7037c", - "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_process/1.5.4/source.json": "f3aef1e0b1f524f92acdcbda47ba0ade10fcdeed5c686524ec69d89eb4cda835", + "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_process/1.6.0/MODULE.bazel": "2496bc24311f69f49449ee85d8bb38e3b970cbfcf10d0a7f19b2d5262ce80e8d", + "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_process/1.6.0/source.json": "093424aa8bfed8705a3d142b21fe1d053258f2dd5eb1944941f6439b2c7157e9", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_python_basics/0.3.0/MODULE.bazel": "785ddd5295213e36c31ab86bdc34f29c0f7d1b72e9abd931bb08f42c0e48e2e9", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_python_basics/0.3.1/MODULE.bazel": "99c491109937542e61df090222666a8613ef946fa7bb2b2d5ba648b2baba03ad", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_python_basics/0.3.2/MODULE.bazel": "f25490f64035a0e3a0d53ad9cb6164e8325ce6cf2a7ee68c6ae153840cb2497e", @@ -1439,7 +1455,7 @@ "@@aspect_tools_telemetry+//:extension.bzl%telemetry": { "general": { "bzlTransitiveDigest": "gA7tPEdJXhskzPIEUxjX9IdDrM6+WjfbgXJ8Ez47umk=", - "usagesDigest": "i1FqFhjXyyH6bfERz4zwy4c9HppAM5D5gaFRtmhxi/E=", + "usagesDigest": "z8cWWnVpO8J/dzJXjYbJOFOppzxrQWI6B21RNkSjQI4=", "recordedFileInputs": {}, "recordedDirentsInputs": {}, "envVariables": {}, @@ -1448,7 +1464,7 @@ "repoRuleId": "@@aspect_tools_telemetry+//:extension.bzl%tel_repository", "attributes": { "deps": { - "aspect_rules_lint": "2.0.0", + "aspect_rules_lint": "2.3.0", "aspect_tools_telemetry": "0.2.8" } } @@ -9484,6 +9500,70 @@ ] } }, + "@@score_bazel_cpp_toolchains+//extensions:gcc.bzl%gcc": { + "general": { + "bzlTransitiveDigest": "FPdomjlUToKRMMVvxdB1HPeVVF0Bk9iaEODAcgx7tcw=", + "usagesDigest": "kYz1Ecksh70VzQLPbG64fDpc+5OBWUcGuPwLxyXoQQg=", + "recordedFileInputs": {}, + "recordedDirentsInputs": {}, + "envVariables": {}, + "generatedRepoSpecs": { + "score_gcc_x86_64_toolchain_pkg": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "urls": [ + "https://github.com/eclipse-score/toolchains_gcc_packages/releases/download/v0.0.4/x86_64-unknown-linux-gnu_gcc12.tar.gz" + ], + "build_file": "@@score_bazel_cpp_toolchains+//packages/linux/x86_64/gcc/12.2.0:gcc.BUILD", + "sha256": "e9b9a7a63a5f8271b76d6e2057906b95c7a244e4931a8e10edeaa241e9f7c11e", + "strip_prefix": "x86_64-unknown-linux-gnu" + } + }, + "score_gcc_x86_64_toolchain": { + "repoRuleId": "@@score_bazel_cpp_toolchains+//rules:gcc.bzl%gcc_toolchain", + "attributes": { + "extra_compile_flags": [], + "extra_c_compile_flags": [], + "extra_cxx_compile_flags": [], + "extra_link_flags": [], + "license_info_variable": "", + "license_info_value": "", + "license_path": "/opt/score_qnx/license/licenses", + "sdk_version": "", + "sdp_version": "", + "tc_compiler_library_search_paths": [], + "tc_cpu": "x86_64", + "tc_identifier": "gcc_12.2.0", + "tc_os": "linux", + "tc_pkg_repo": "score_gcc_x86_64_toolchain_pkg", + "tc_system_toolchain": false, + "tc_runtime_ecosystem": "", + "gcc_version": "12.2.0", + "cc_toolchain_config": "@@score_bazel_cpp_toolchains+//templates/linux:cc_toolchain_config.bzl.template", + "cc_toolchain_flags": "@@score_bazel_cpp_toolchains+//templates/linux:cc_toolchain_flags.bzl.template", + "use_base_constraints_only": false + } + } + }, + "recordedRepoMappingEntries": [ + [ + "bazel_tools", + "rules_cc", + "rules_cc+" + ], + [ + "score_bazel_cpp_toolchains+", + "bazel_tools", + "bazel_tools" + ], + [ + "score_bazel_cpp_toolchains+", + "score_bazel_cpp_toolchains", + "score_bazel_cpp_toolchains+" + ] + ] + } + }, "@@toolchains_llvm+//toolchain/extensions:llvm.bzl%llvm": { "general": { "bzlTransitiveDigest": "n8WR0DxEQ5FgfuREm47KayUAJKtFHcMNZLKerT+ixFY=", diff --git a/score/config_management/config_daemon/code/app/details/BUILD b/score/config_management/config_daemon/code/app/details/BUILD index e880ce4..3037af1 100644 --- a/score/config_management/config_daemon/code/app/details/BUILD +++ b/score/config_management/config_daemon/code/app/details/BUILD @@ -66,8 +66,8 @@ cc_test( features = COMPILER_WARNING_FEATURES, tags = ["unit"], visibility = [ - "//score/config_management/config_daemon/code/app:__pkg__", "//requirements:__pkg__", + "//score/config_management/config_daemon/code/app:__pkg__", ], deps = [ ":app_for_unit_test", @@ -77,11 +77,11 @@ cc_test( "//score/config_management/config_daemon/code/plugins:mock", "//score/config_management/config_daemon/code/plugins/plugin_collector:mock", "//score/config_management/config_daemon/code/services:mock", + "@googletest//:gtest_main", "@score_baselibs//score/os/mocklib:stat_mock", - "@score_lifecycle_health//src/lifecycle_client_lib:applicationcontext", - "@score_lifecycle_health//src/lifecycle_client_lib:lifecycle_mock", "@score_communication//score/mw/service:factory", "@score_communication//score/mw/service:provided_service_container", - "@googletest//:gtest_main", + "@score_lifecycle_health//src/lifecycle_client_lib:applicationcontext", + "@score_lifecycle_health//src/lifecycle_client_lib:lifecycle_mock", ], ) diff --git a/score/config_management/config_daemon/code/data_model/BUILD b/score/config_management/config_daemon/code/data_model/BUILD index 0137066..68d0077 100644 --- a/score/config_management/config_daemon/code/data_model/BUILD +++ b/score/config_management/config_daemon/code/data_model/BUILD @@ -70,8 +70,8 @@ cc_library( hdrs = ["parameterset_collection_manager_mock.h"], features = COMPILER_WARNING_FEATURES, visibility = [ - "//score/config_management/config_daemon/code:__subpackages__", "//score:__subpackages__", + "//score/config_management/config_daemon/code:__subpackages__", ], deps = [ ":parameterset_collection_manager", diff --git a/score/config_management/config_daemon/code/data_model/details/BUILD b/score/config_management/config_daemon/code/data_model/details/BUILD index 52d5140..a90fb7e 100644 --- a/score/config_management/config_daemon/code/data_model/details/BUILD +++ b/score/config_management/config_daemon/code/data_model/details/BUILD @@ -30,8 +30,8 @@ cc_library( features = COMPILER_WARNING_FEATURES, tags = ["FUSA"], visibility = [ - "//score/config_management/config_daemon/code:__subpackages__", "//score:__subpackages__", + "//score/config_management/config_daemon/code:__subpackages__", ], deps = [ "//score/config_management/config_daemon/code/data_model:parameter_set_qualifier", @@ -40,8 +40,8 @@ cc_library( "//score/config_management/config_daemon/code/data_model/parameter_set_storage", "@score_baselibs//score/filesystem", "@score_baselibs//score/json", - "@score_logging//score/mw/log", "@score_baselibs//score/language/futurecpp", + "@score_logging//score/mw/log", ], ) @@ -75,8 +75,8 @@ cc_test( visibility = ["//score/config_management/config_daemon/code/data_model:__pkg__"], deps = [ ":parameterset_collection_impl", - "@score_baselibs//score/json:mock", "@googletest//:gtest_main", + "@score_baselibs//score/json:mock", ], ) @@ -92,7 +92,7 @@ cc_test( "//score/config_management/config_daemon/code/data_model/parameter_set_storage:mock", "//score/config_management/config_daemon/code/plugins:mock", "//score/config_management/config_daemon/code/types/initial_qualifier_state", - "@score_logging//score/mw/log/test/console_logging_environment", "@googletest//:gtest_main", + "@score_logging//score/mw/log/test/console_logging_environment", ], ) diff --git a/score/config_management/config_daemon/code/data_model/parameter_set_storage/details/BUILD b/score/config_management/config_daemon/code/data_model/parameter_set_storage/details/BUILD index d81f9f5..dcfc1fd 100644 --- a/score/config_management/config_daemon/code/data_model/parameter_set_storage/details/BUILD +++ b/score/config_management/config_daemon/code/data_model/parameter_set_storage/details/BUILD @@ -72,9 +72,9 @@ cc_test( deps = [ ":details_score_for_unit_test", "//score/config_management/config_daemon/code/data_model:parameterset_collection_mock", - "@score_logging//score/mw/log/test/console_logging_environment", "@googletest//:gtest", "@googletest//:gtest_main", + "@score_logging//score/mw/log/test/console_logging_environment", ], ) @@ -93,8 +93,8 @@ cc_test( ], deps = [ "//score/config_management/config_daemon/code/data_model:parameterset_collection_mock", - "@score_logging//score/mw/log/test/console_logging_environment", "@googletest//:gtest", + "@score_logging//score/mw/log/test/console_logging_environment", ] + select({ "//score/config_management/config_daemon/code:is_score_variant": [ ":details_score_for_unit_test", diff --git a/score/config_management/config_daemon/code/data_model/parameter_set_storage/error/BUILD b/score/config_management/config_daemon/code/data_model/parameter_set_storage/error/BUILD index 3163173..a47827b 100644 --- a/score/config_management/config_daemon/code/data_model/parameter_set_storage/error/BUILD +++ b/score/config_management/config_daemon/code/data_model/parameter_set_storage/error/BUILD @@ -29,8 +29,8 @@ cc_library( "//score/config_management/config_daemon/code:__subpackages__", ], deps = [ - "@score_baselibs//score/result", "@score_baselibs//score/language/futurecpp", + "@score_baselibs//score/result", ], ) diff --git a/score/config_management/config_daemon/code/data_model/parameterset_collection_interfaces/BUILD b/score/config_management/config_daemon/code/data_model/parameterset_collection_interfaces/BUILD index 6089440..aadf61b 100644 --- a/score/config_management/config_daemon/code/data_model/parameterset_collection_interfaces/BUILD +++ b/score/config_management/config_daemon/code/data_model/parameterset_collection_interfaces/BUILD @@ -27,8 +27,8 @@ cc_library( visibility = ["//score/config_management/config_daemon:__subpackages__"], deps = [ "@score_baselibs//score/json", - "@score_baselibs//score/result", "@score_baselibs//score/language/futurecpp", + "@score_baselibs//score/result", ], ) diff --git a/score/config_management/config_daemon/code/factory/details/BUILD b/score/config_management/config_daemon/code/factory/details/BUILD index d744327..2595042 100644 --- a/score/config_management/config_daemon/code/factory/details/BUILD +++ b/score/config_management/config_daemon/code/factory/details/BUILD @@ -36,7 +36,6 @@ load("@score_baselibs//score/language/safecpp:toolchain_features.bzl", "COMPILER ] + dependencies, ) for name, srcs, testonly, visibility, dependencies in [ - ( "mw_factory", ["factory_mw_impl.cpp"], @@ -54,7 +53,6 @@ load("@score_baselibs//score/language/safecpp:toolchain_features.bzl", "COMPILER "//score/config_management/config_daemon/code/data_model/parameter_set_storage/details:details_score", ], ), - ( "mw_factory_for_unit_test", ["factory_mw_impl.cpp"], @@ -109,6 +107,5 @@ load("@score_baselibs//score/language/safecpp:toolchain_features.bzl", "COMPILER ], ["//score/config_management/config_daemon/code/services/details/mw_com:mw_com_config"], ), - ] ] diff --git a/score/config_management/config_daemon/code/json_helper/details/BUILD b/score/config_management/config_daemon/code/json_helper/details/BUILD index 782454f..8939372 100644 --- a/score/config_management/config_daemon/code/json_helper/details/BUILD +++ b/score/config_management/config_daemon/code/json_helper/details/BUILD @@ -22,8 +22,8 @@ cc_library( features = COMPILER_WARNING_FEATURES, tags = ["FFI"], visibility = [ - "//score/config_management/config_daemon/code:__subpackages__", "//score:__subpackages__", + "//score/config_management/config_daemon/code:__subpackages__", ], deps = [ "//score/config_management/config_daemon/code/json_helper", diff --git a/score/config_management/config_daemon/code/plugins/BUILD b/score/config_management/config_daemon/code/plugins/BUILD index bb5cf91..c471996 100644 --- a/score/config_management/config_daemon/code/plugins/BUILD +++ b/score/config_management/config_daemon/code/plugins/BUILD @@ -31,8 +31,8 @@ cc_library( "//score/config_management/config_daemon/code/data_model:parameterset_collection_manager", "//score/config_management/config_daemon/code/fault_event_reporter", "//score/config_management/config_daemon/code/services", - "@score_baselibs//score/result", "@score_baselibs//score/language/futurecpp", + "@score_baselibs//score/result", ], ) diff --git a/score/config_management/config_daemon/code/plugins/demo_json/details/BUILD b/score/config_management/config_daemon/code/plugins/demo_json/details/BUILD index 64df2af..b97301f 100644 --- a/score/config_management/config_daemon/code/plugins/demo_json/details/BUILD +++ b/score/config_management/config_daemon/code/plugins/demo_json/details/BUILD @@ -1,6 +1,6 @@ load("@rules_cc//cc:defs.bzl", "cc_library") -load("@score_baselibs//score/language/safecpp:toolchain_features.bzl", "COMPILER_WARNING_FEATURES") load("@score_baselibs//:bazel/unit_tests.bzl", "cc_gtest_unit_test", "cc_unit_test_suites_for_host_and_qnx") +load("@score_baselibs//score/language/safecpp:toolchain_features.bzl", "COMPILER_WARNING_FEATURES") cc_library( name = "demo_json_plugin_impl", diff --git a/score/config_management/config_daemon/code/plugins/demo_json/parameter_loader/details/BUILD b/score/config_management/config_daemon/code/plugins/demo_json/parameter_loader/details/BUILD index f68478c..682c2a3 100644 --- a/score/config_management/config_daemon/code/plugins/demo_json/parameter_loader/details/BUILD +++ b/score/config_management/config_daemon/code/plugins/demo_json/parameter_loader/details/BUILD @@ -1,6 +1,6 @@ load("@rules_cc//cc:defs.bzl", "cc_library") -load("@score_baselibs//score/language/safecpp:toolchain_features.bzl", "COMPILER_WARNING_FEATURES") load("@score_baselibs//:bazel/unit_tests.bzl", "cc_gtest_unit_test", "cc_unit_test_suites_for_host_and_qnx") +load("@score_baselibs//score/language/safecpp:toolchain_features.bzl", "COMPILER_WARNING_FEATURES") cc_library( name = "demo_parameter_loader_impl", @@ -16,8 +16,8 @@ cc_library( "//score/config_management/config_daemon/code/data_model:parameterset_collection", "//score/config_management/config_daemon/code/plugins/demo_json/parameter_loader:demo_parameter_loader", "@score_baselibs//score/json:json_serializer", - "@score_logging//score/mw/log", "@score_baselibs//score/language/futurecpp", + "@score_logging//score/mw/log", ], ) diff --git a/score/config_management/config_daemon/code/plugins/demo_json/plugin_creator/BUILD b/score/config_management/config_daemon/code/plugins/demo_json/plugin_creator/BUILD index bc3f88e..975a30b 100644 --- a/score/config_management/config_daemon/code/plugins/demo_json/plugin_creator/BUILD +++ b/score/config_management/config_daemon/code/plugins/demo_json/plugin_creator/BUILD @@ -1,6 +1,6 @@ load("@rules_cc//cc:defs.bzl", "cc_library") -load("@score_baselibs//score/language/safecpp:toolchain_features.bzl", "COMPILER_WARNING_FEATURES") load("@score_baselibs//:bazel/unit_tests.bzl", "cc_gtest_unit_test", "cc_unit_test_suites_for_host_and_qnx") +load("@score_baselibs//score/language/safecpp:toolchain_features.bzl", "COMPILER_WARNING_FEATURES") cc_library( name = "demo_json_plugin_creator", diff --git a/score/config_management/config_daemon/code/plugins/plugin_collector/details/BUILD b/score/config_management/config_daemon/code/plugins/plugin_collector/details/BUILD index cdd861f..ceced4f 100644 --- a/score/config_management/config_daemon/code/plugins/plugin_collector/details/BUILD +++ b/score/config_management/config_daemon/code/plugins/plugin_collector/details/BUILD @@ -78,8 +78,8 @@ cc_test( visibility = ["//score/config_management/config_daemon:__subpackages__"], deps = [ ":details_for_unit_test", - "@score_logging//score/mw/log/test/console_logging_environment", "@googletest//:gtest", "@googletest//:gtest_main", + "@score_logging//score/mw/log/test/console_logging_environment", ], ) diff --git a/score/config_management/config_daemon/code/services/BUILD b/score/config_management/config_daemon/code/services/BUILD index f4fbfd4..db920bb 100644 --- a/score/config_management/config_daemon/code/services/BUILD +++ b/score/config_management/config_daemon/code/services/BUILD @@ -29,8 +29,8 @@ cc_library( visibility = ["//score/config_management/config_daemon:__subpackages__"], deps = [ "//score/config_management/config_daemon/code/types/initial_qualifier_state", - "@score_communication//score/mw/service:provided_service_container", "@score_baselibs//score/language/futurecpp", + "@score_communication//score/mw/service:provided_service_container", ], ) @@ -69,8 +69,8 @@ cc_library( "//score/config_management/config_daemon/code:__subpackages__", ], deps = [ - "@score_baselibs//score/result", "@score_baselibs//score/language/futurecpp", + "@score_baselibs//score/result", ], ) diff --git a/score/config_management/config_provider/code/config_provider/BUILD b/score/config_management/config_provider/code/config_provider/BUILD index 42efd67..bf3021d 100644 --- a/score/config_management/config_provider/code/config_provider/BUILD +++ b/score/config_management/config_provider/code/config_provider/BUILD @@ -9,8 +9,8 @@ cc_library( features = COMPILER_WARNING_FEATURES, tags = ["FUSA"], visibility = [ - "//score/config_management/config_provider:__subpackages__", "//score:__subpackages__", + "//score/config_management/config_provider:__subpackages__", ], deps = ["@score_baselibs//score/language/futurecpp"], ) @@ -22,8 +22,8 @@ cc_library( features = COMPILER_WARNING_FEATURES, tags = ["FUSA"], visibility = [ - "//score/config_management/config_provider:__subpackages__", "//score:__subpackages__", + "//score/config_management/config_provider:__subpackages__", ], deps = [ ":initial_qualifier_state_types", diff --git a/score/config_management/config_provider/code/config_provider/details/BUILD b/score/config_management/config_provider/code/config_provider/details/BUILD index c1a30cb..937b056 100644 --- a/score/config_management/config_provider/code/config_provider/details/BUILD +++ b/score/config_management/config_provider/code/config_provider/details/BUILD @@ -12,10 +12,7 @@ cc_library( ], features = COMPILER_WARNING_FEATURES, tags = ["FUSA"], - visibility = [ - "//score/config_management/config_provider:__subpackages__", - "//score/config_management/config_provider:__subpackages__", - ], + visibility = ["//score/config_management/config_provider:__subpackages__"], deps = [ "//score/config_management/config_provider/code/config_provider", "//score/config_management/config_provider/code/config_provider/error", @@ -23,9 +20,9 @@ cc_library( "//score/config_management/config_provider/code/proxies:internal_config_provider", "@score_baselibs//score/concurrency:condition_variable", "@score_baselibs//score/concurrency/future", - "@score_logging//score/mw/log", - "@score_communication//score/mw/service:proxy_data", "@score_baselibs//score/language/futurecpp", + "@score_communication//score/mw/service:proxy_data", + "@score_logging//score/mw/log", ], ) @@ -45,9 +42,9 @@ cc_test( "//score/config_management/config_provider/code/persistency:mock", "//score/config_management/config_provider/code/persistency/error", "//score/config_management/config_provider/code/proxies:mock", + "@googletest//:gtest_main", "@score_baselibs//score/concurrency:notification", "@score_baselibs//score/mw/log:recorder_mock", - "@googletest//:gtest_main", ], ) diff --git a/score/config_management/config_provider/code/config_provider/error/BUILD b/score/config_management/config_provider/code/config_provider/error/BUILD index f886aa8..72d24e8 100644 --- a/score/config_management/config_provider/code/config_provider/error/BUILD +++ b/score/config_management/config_provider/code/config_provider/error/BUILD @@ -13,7 +13,6 @@ cc_library( features = COMPILER_WARNING_FEATURES, tags = ["FUSA"], visibility = [ - "//score/config_management/config_provider:__subpackages__", ], deps = [ diff --git a/score/config_management/config_provider/code/config_provider/factory/BUILD b/score/config_management/config_provider/code/config_provider/factory/BUILD index be48aa4..1458ed3 100644 --- a/score/config_management/config_provider/code/config_provider/factory/BUILD +++ b/score/config_management/config_provider/code/config_provider/factory/BUILD @@ -10,16 +10,15 @@ cc_library( features = COMPILER_WARNING_FEATURES, tags = ["FUSA"], visibility = [ - "//score/config_management/config_provider:__subpackages__", ], deps = [ "//score/config_management/config_provider/code/config_provider/details", - "//score/config_management/config_provider/code/persistency/details:details", + "//score/config_management/config_provider/code/persistency/details", "//score/config_management/config_provider/code/proxies/details:details_mw_com", - "@score_logging//score/mw/log", "@score_communication//score/mw/service:factory", "@score_communication//score/mw/service/backend/mw_com:single_instantiation_strategy", + "@score_logging//score/mw/log", ], ) diff --git a/score/config_management/config_provider/code/parameter_set/BUILD b/score/config_management/config_provider/code/parameter_set/BUILD index 7c093ca..0da46e9 100644 --- a/score/config_management/config_provider/code/parameter_set/BUILD +++ b/score/config_management/config_provider/code/parameter_set/BUILD @@ -33,8 +33,8 @@ cc_test( ":parameter_set", "//score/config_management/config_daemon/code/data_model:parameter_set_qualifier", "//score/config_management/config_provider:config_provider_mock", - "@score_logging//score/mw/log/test/console_logging_environment", "@googletest//:gtest_main", + "@score_logging//score/mw/log/test/console_logging_environment", ], ) diff --git a/score/config_management/config_provider/code/persistency/details/BUILD b/score/config_management/config_provider/code/persistency/details/BUILD index 0f4f4c1..b325400 100644 --- a/score/config_management/config_provider/code/persistency/details/BUILD +++ b/score/config_management/config_provider/code/persistency/details/BUILD @@ -13,8 +13,8 @@ cc_library( ], deps = [ "//score/config_management/config_provider/code/persistency", - "@score_logging//score/mw/log", "@score_baselibs//score/language/futurecpp", + "@score_logging//score/mw/log", ], ) diff --git a/third_party/traceability/tools/source_code_linker/src/source_code_linker/git_utils.py b/third_party/traceability/tools/source_code_linker/src/source_code_linker/git_utils.py index 23c0733..c8d05cb 100644 --- a/third_party/traceability/tools/source_code_linker/src/source_code_linker/git_utils.py +++ b/third_party/traceability/tools/source_code_linker/src/source_code_linker/git_utils.py @@ -123,17 +123,14 @@ def get_default_branch() -> str: try: # Check remote branches to determine if main or master exists result = subprocess.run( - ["git", "branch", "-r"], - capture_output=True, - text=True, - cwd=find_git_root() + ["git", "branch", "-r"], capture_output=True, text=True, cwd=find_git_root() ) if result.returncode == 0: branches = result.stdout.strip() # Check for main first (modern default) - if 'origin/main' in branches: + if "origin/main" in branches: return "main" - elif 'origin/master' in branches: + elif "origin/master" in branches: return "master" except Exception as e: logger.debug(f"Could not determine default branch: {e}") @@ -172,7 +169,9 @@ def get_git_hash(file_path: str) -> str: # If git hash is empty, return the default branch (main or master) if not decoded_result: default_branch = get_default_branch() - logger.debug(f"Empty git hash for {abs_path}, using default branch '{default_branch}'") + logger.debug( + f"Empty git hash for {abs_path}, using default branch '{default_branch}'" + ) return default_branch # sanity check diff --git a/third_party/traceability/tools/source_code_linker/src/source_code_linker/main.py b/third_party/traceability/tools/source_code_linker/src/source_code_linker/main.py index bfea363..f1ab70c 100644 --- a/third_party/traceability/tools/source_code_linker/src/source_code_linker/main.py +++ b/third_party/traceability/tools/source_code_linker/src/source_code_linker/main.py @@ -48,11 +48,11 @@ def setup_logging(self, log_level: str = "INFO") -> None: """ numeric_level = getattr(logging, log_level.upper(), None) if not isinstance(numeric_level, int): - raise ValueError(f'Invalid log level: {log_level}') + raise ValueError(f"Invalid log level: {log_level}") logging.basicConfig( level=numeric_level, - format='%(asctime)s - %(name)s - %(levelname)s - %(message)s' + format="%(asctime)s - %(name)s - %(levelname)s - %(message)s", ) def parse_arguments(self) -> argparse.Namespace: @@ -70,58 +70,53 @@ def parse_arguments(self) -> argparse.Namespace: # 1. Positional arguments (for Bazel integration) parser.add_argument( "inputs", - nargs='*', - help="Input files containing lists of source files to process (positional)" + nargs="*", + help="Input files containing lists of source files to process (positional)", ) # 2. Named arguments (for direct usage) parser.add_argument( "--input-files", - nargs='+', - help="Input files containing lists of source files to process (named)" + nargs="+", + help="Input files containing lists of source files to process (named)", ) parser.add_argument( - "-o", "--output", - required=True, - help="Output lobster JSON file path" + "-o", "--output", required=True, help="Output lobster JSON file path" ) parser.add_argument( - "--sources_output", - help="Output sources text file path (optional)" + "--sources_output", help="Output sources text file path (optional)" ) parser.add_argument( - "-t", "--trace", + "-t", + "--trace", choices=["code", "plantuml_alias_cpp", "plantuml_alias_req", "plantuml"], default="code", - help="Traceability mode: code, plantuml_alias_cpp, plantuml_alias_req, or plantuml" + help="Traceability mode: code, plantuml_alias_cpp, plantuml_alias_req, or plantuml", ) parser.add_argument( - "--tags", - help="Pipe-separated list of traceability tags to search for" + "--tags", help="Pipe-separated list of traceability tags to search for" ) parser.add_argument( - "-u", "--url", - default="broken_link_g/", - help="Base GitHub URL" + "-u", "--url", default="broken_link_g/", help="Base GitHub URL" ) parser.add_argument( "--log-level", choices=["DEBUG", "INFO", "WARNING", "ERROR"], default="INFO", - help="Logging level" + help="Logging level", ) args = parser.parse_args() # Determine input files from either positional or named arguments # Priority: --input-files (named) > positional inputs - if hasattr(args, 'input_files') and args.input_files: + if hasattr(args, "input_files") and args.input_files: args.inputs = args.input_files else: args.inputs = args.inputs or [] @@ -134,7 +129,7 @@ def parse_arguments(self) -> argparse.Namespace: # Auto-generate sources_output if not provided (but different from input) if not args.sources_output: - base_name = args.output.replace('.lobster', '') + base_name = args.output.replace(".lobster", "") args.sources_output = f"{base_name}_generated_sources.txt" return args @@ -193,7 +188,7 @@ def process_source_files( source_files: List[str], github_base_url: str, tags: List[str], - trace_mode: str + trace_mode: str, ) -> List[dict]: """ Process all source files to extract traceability information. @@ -288,7 +283,7 @@ def run(self) -> None: merged_result, list(source_files), # Convert set back to list args.output, - args.sources_output + args.sources_output, ) logger.info("Source code linking process completed successfully") diff --git a/third_party/traceability/tools/source_code_linker/src/source_code_linker/parser.py b/third_party/traceability/tools/source_code_linker/src/source_code_linker/parser.py index c4d3f06..4928dd2 100644 --- a/third_party/traceability/tools/source_code_linker/src/source_code_linker/parser.py +++ b/third_party/traceability/tools/source_code_linker/src/source_code_linker/parser.py @@ -44,7 +44,9 @@ def __init__(self, git_hash_func: Optional[Callable[[str], str]] = None): "' trace:", ] - def extract_id_from_line_standard(self, line: str, tags: List[str]) -> Optional[str]: + def extract_id_from_line_standard( + self, line: str, tags: List[str] + ) -> Optional[str]: """ Parse a single line to extract the ID from standard source files. @@ -70,7 +72,9 @@ def extract_id_from_line_standard(self, line: str, tags: List[str]) -> Optional[ return id_part.split()[0] if id_part else None return None - def extract_id_from_plantuml_alias(self, line: str, nodes: List[str]) -> Optional[str]: + def extract_id_from_plantuml_alias( + self, line: str, nodes: List[str] + ) -> Optional[str]: """ Parse a single line to extract the ID from PlantUML alias nodes (e.g., $TopEvent, $BasicEvent). @@ -87,25 +91,27 @@ def extract_id_from_plantuml_alias(self, line: str, nodes: List[str]) -> Optiona The extracted ID if found, None otherwise. """ # Step 1: Clean the line of \n, and \\n - cleaned_line = line.replace('\n', '').replace('\\n', '') + cleaned_line = line.replace("\n", "").replace("\\n", "") # Step 2: Remove all single and double quotes - cleaned_line = cleaned_line.replace('"', '').replace("'", '').replace("{",'').strip() + cleaned_line = ( + cleaned_line.replace('"', "").replace("'", "").replace("{", "").strip() + ) # Step 3: Search for nodes and capture the ID for node in nodes: if cleaned_line.startswith(node): # Scan for Macro - if node.startswith('$'): - parts = cleaned_line.split(',') + if node.startswith("$"): + parts = cleaned_line.split(",") if len(parts) >= 2: - return parts[1].strip().rstrip(')') - else: # scan for normal plantuml element + return parts[1].strip().rstrip(")") + else: # scan for normal plantuml element # Remove the identifier from the start of the line - parts = cleaned_line[len(node):].strip().split() + parts = cleaned_line[len(node) :].strip().split() # If there are at least 3 parts and the second-to-last is 'as', return the last part - if len(parts) >= 3 and parts[-2] == 'as': + if len(parts) >= 3 and parts[-2] == "as": return parts[-1], node # If there's only one part after the identifier, return it @@ -125,7 +131,7 @@ def extract_id_from_plantuml_element(self, line: str, node: str) -> Optional[str Returns: Optional[str]: The extracted ID if found, None otherwise. """ - cleaned_line = line.replace('\n', '').replace('\\n', '').strip() + cleaned_line = line.replace("\n", "").replace("\\n", "").strip() # Escape the node name for safe regex usage escaped_node = re.escape(node) @@ -133,14 +139,16 @@ def extract_id_from_plantuml_element(self, line: str, node: str) -> Optional[str # Special handling for interface methods (e.g., +GetNumber(), +SetNumber()) if node == "interface": # Look for method pattern: +method_name() - method_pattern = r'^\s*\+(\w+)\(' + method_pattern = r"^\s*\+(\w+)\(" match = re.match(method_pattern, cleaned_line) if match: method_name = match.group(1) return method_name # Pattern 1: "SampleLibrary" as SL - quoted_with_alias = re.search(rf'^\s*{escaped_node}\s+"([^"]+)"\s+as\s+(\w+)', cleaned_line) + quoted_with_alias = re.search( + rf'^\s*{escaped_node}\s+"([^"]+)"\s+as\s+(\w+)', cleaned_line + ) if quoted_with_alias: return quoted_with_alias.group(2) # Return alias @@ -150,17 +158,14 @@ def extract_id_from_plantuml_element(self, line: str, node: str) -> Optional[str return quoted_no_alias.group(1) # Return name # Pattern 3: SampleLibrary - simple_no_alias = re.search(rf'^\s*{escaped_node}\s+(\w+)', cleaned_line) + simple_no_alias = re.search(rf"^\s*{escaped_node}\s+(\w+)", cleaned_line) if simple_no_alias: return simple_no_alias.group(1) # Return name return None def parse_standard_file( - self, - source_file: str, - github_base_url: str, - tags: List[str] + self, source_file: str, github_base_url: str, tags: List[str] ) -> Dict[str, List[str]]: """ Extract tags from standard source files (non-PlantUML files). @@ -191,10 +196,7 @@ def parse_standard_file( return requirement_mapping def parse_plantuml_file( - self, - source_file: str, - github_base_url: str, - nodes: List[str] + self, source_file: str, github_base_url: str, nodes: List[str] ) -> Dict[str, List[str]]: """ Extract tags from PlantUML files (.puml files). @@ -217,16 +219,18 @@ def parse_plantuml_file( for line_number, line in enumerate(f): line_number = line_number + 1 - cleaned_line = line.replace('\n', '').replace('\\n', '').strip() + cleaned_line = line.replace("\n", "").replace("\\n", "").strip() # Track interface context for proper method prefixing if "interface" in nodes: # Check if this line defines an interface - interface_name = self.extract_id_from_plantuml_element(line, "interface") - if interface_name and not cleaned_line.strip().startswith('+'): + interface_name = self.extract_id_from_plantuml_element( + line, "interface" + ) + if interface_name and not cleaned_line.strip().startswith("+"): # This is an interface definition, not a method current_interface = interface_name - elif cleaned_line.strip() == '}': + elif cleaned_line.strip() == "}": # End of interface block current_interface = None @@ -235,7 +239,11 @@ def parse_plantuml_file( req_id = self.extract_plantuml_element(line, node) if req_id: # For interface methods, prefix with interface name - if node == "interface" and current_interface and cleaned_line.strip().startswith('+'): + if ( + node == "interface" + and current_interface + and cleaned_line.strip().startswith("+") + ): req_id = f"{current_interface}.{req_id}" link = f"{github_base_url}/blob/{hash}/{source_file}#L{line_number}" @@ -255,7 +263,7 @@ def extract_plantuml_element(self, line: str, node: str) -> Optional[str]: Optional[str]: The extracted ID if found, None otherwise. """ # For plantuml_alias mode (nodes starting with $), use the alias extraction logic - if node.startswith('$'): + if node.startswith("$"): return self.extract_id_from_plantuml_alias(line, [node]) else: # For general plantuml mode, use the element extraction logic @@ -267,7 +275,7 @@ def parse_file( github_base_url: str, tags: List[str], mode: str = "code", - nodes: Optional[List[str]] = None + nodes: Optional[List[str]] = None, ) -> Dict[str, List[str]]: """ Dispatch to appropriate parser based on file extension and mode. @@ -282,8 +290,12 @@ def parse_file( Returns: Dict[str, List[str]]: mapping of requirement IDs to GitHub URLs. """ - if source_file.endswith('.puml'): - if mode == "plantuml_alias_cpp" or mode == "plantuml_alias_req" or mode == "plantuml": + if source_file.endswith(".puml"): + if ( + mode == "plantuml_alias_cpp" + or mode == "plantuml_alias_req" + or mode == "plantuml" + ): # For plantuml modes: process all tags without filtering if tags: return self.parse_plantuml_file(source_file, github_base_url, tags) diff --git a/third_party/traceability/tools/source_code_linker/src/source_code_linker/transformer.py b/third_party/traceability/tools/source_code_linker/src/source_code_linker/transformer.py index ee88e85..f2931df 100644 --- a/third_party/traceability/tools/source_code_linker/src/source_code_linker/transformer.py +++ b/third_party/traceability/tools/source_code_linker/src/source_code_linker/transformer.py @@ -32,20 +32,18 @@ def __init__(self): "data": [], "generator": "lobster_cpp", "schema": "lobster-imp-trace", - "version": 3 + "version": 3, } self.lobster_reqs_template = { "data": [], "generator": "lobster-trlc", "schema": "lobster-req-trace", - "version": 4 + "version": 4, } def transform_to_code_format( - self, - requirement_mapping: Dict[str, List[str]], - source_file: str + self, requirement_mapping: Dict[str, List[str]], source_file: str ) -> Dict[str, Any]: """ Transform parsed data to lobster code format. @@ -85,11 +83,9 @@ def transform_to_code_format( "just_up": [], "just_down": [], "just_global": [], - "refs": [ - f"req {req_id}" - ], + "refs": [f"req {req_id}"], "language": "cpp", - "kind": "Function" + "kind": "Function", } result["data"].append(codetag) @@ -100,7 +96,7 @@ def transform_to_requirements_format( self, requirement_mapping: Dict[str, List[str]], source_file: str, - mode: str = "plantuml" + mode: str = "plantuml", ) -> Dict[str, Any]: """ Transform parsed data to lobster requirements format. @@ -145,9 +141,7 @@ def transform_to_requirements_format( return result def transform_to_interface_format( - self, - requirement_mapping: Dict[str, List[str]], - source_file: str + self, requirement_mapping: Dict[str, List[str]], source_file: str ) -> Dict[str, Any]: """ Transform parsed data to lobster interface requirements format. @@ -199,10 +193,7 @@ def transform_to_interface_format( return result def transform_parsed_data( - self, - requirement_mapping: Dict[str, List[str]], - source_file: str, - mode: str + self, requirement_mapping: Dict[str, List[str]], source_file: str, mode: str ) -> Dict[str, Any]: """ Transform parsed data to the specified output format. @@ -218,9 +209,13 @@ def transform_parsed_data( if mode == "plantuml_alias_cpp": return self.transform_to_code_format(requirement_mapping, source_file) elif mode == "plantuml_alias_req": - return self.transform_to_requirements_format(requirement_mapping, source_file, mode) + return self.transform_to_requirements_format( + requirement_mapping, source_file, mode + ) elif mode == "plantuml": - return self.transform_to_requirements_format(requirement_mapping, source_file, mode) + return self.transform_to_requirements_format( + requirement_mapping, source_file, mode + ) else: # mode == "code" (default) return self.transform_to_code_format(requirement_mapping, source_file) @@ -242,7 +237,7 @@ def merge_results(self, results: List[Dict[str, Any]]) -> Dict[str, Any]: "data": [], "generator": results[0].get("generator", "lobster_cpp"), "schema": results[0].get("schema", "lobster-imp-trace"), - "version": results[0].get("version", 3) + "version": results[0].get("version", 3), } # Collect all data entries diff --git a/third_party/traceability/tools/source_code_linker/src/source_code_linker/writer.py b/third_party/traceability/tools/source_code_linker/src/source_code_linker/writer.py index ee28b87..393eb42 100644 --- a/third_party/traceability/tools/source_code_linker/src/source_code_linker/writer.py +++ b/third_party/traceability/tools/source_code_linker/src/source_code_linker/writer.py @@ -123,8 +123,7 @@ def format_lobster_data(self, data: Dict[str, Any]) -> Dict[str, Any]: # Ensure data is sorted by tag for consistent output if "data" in formatted_data and isinstance(formatted_data["data"], list): formatted_data["data"] = sorted( - formatted_data["data"], - key=lambda x: x.get("tag", "") + formatted_data["data"], key=lambda x: x.get("tag", "") ) return formatted_data @@ -134,7 +133,7 @@ def write_output_files( lobster_data: Dict[str, Any], source_files: list, lobster_output_path: str, - sources_output_path: str + sources_output_path: str, ) -> None: """ Write all output files. @@ -164,11 +163,17 @@ def write_output_files( # Check if sources_output_path is one of the input files try: # Try to determine if this is an input file by checking if we can read from it - with open(sources_output_path, 'r') as f: + with open(sources_output_path, "r") as f: content = f.read().strip() # If file contains source file paths, it's likely an input file - if content and not content.startswith('[') and not content.startswith('{'): - logger.debug(f"Skipping sources file write - appears to be input file: {sources_output_path}") + if ( + content + and not content.startswith("[") + and not content.startswith("{") + ): + logger.debug( + f"Skipping sources file write - appears to be input file: {sources_output_path}" + ) return except (IOError, PermissionError): pass @@ -176,4 +181,6 @@ def write_output_files( # Write the sources file self.write_sources_file(source_files, sources_output_path) - logger.info(f"Successfully wrote {len(formatted_data['data'])} entries to output files") + logger.info( + f"Successfully wrote {len(formatted_data['data'])} entries to output files" + ) diff --git a/third_party/traceability/tools/trlc_renderer/BUILD b/third_party/traceability/tools/trlc_renderer/BUILD index e0c9ae6..b1de06b 100644 --- a/third_party/traceability/tools/trlc_renderer/BUILD +++ b/third_party/traceability/tools/trlc_renderer/BUILD @@ -12,7 +12,6 @@ # ******************************************************************************* load("@rules_python//python:defs.bzl", "py_binary") - load("@score_communication_pip//:requirements.bzl", "requirement") py_binary( diff --git a/third_party/traceability/tools/trlc_renderer/trlc_renderer.py b/third_party/traceability/tools/trlc_renderer/trlc_renderer.py index 694e194..ca7f056 100644 --- a/third_party/traceability/tools/trlc_renderer/trlc_renderer.py +++ b/third_party/traceability/tools/trlc_renderer/trlc_renderer.py @@ -28,15 +28,24 @@ 3: "^^^^^^^^^^", } + class TRLCRenderer: - def __init__(self, input_directory: str, output_path: str, mapping_file: str = None, debug: bool = False): + def __init__( + self, + input_directory: str, + output_path: str, + mapping_file: str = None, + debug: bool = False, + ): self.input_directory = input_directory self.output_path = output_path self.debug = debug self.symbols = None self.requirements = None self.req_objects = None - self.type_mapping = self.load_type_mapping(mapping_file) # Load the mapping file if provided + self.type_mapping = self.load_type_mapping( + mapping_file + ) # Load the mapping file if provided if self.debug: logging.basicConfig(level=logging.DEBUG) @@ -44,7 +53,7 @@ def __init__(self, input_directory: str, output_path: str, mapping_file: str = N def load_type_mapping(self, mapping_file: str) -> dict: """Load the requirement type mapping from a JSON file or return an empty mapping.""" if mapping_file: - with open(mapping_file, 'r') as file: + with open(mapping_file, "r") as file: mapping = json.load(file) logging.debug("Loaded type mapping successfully.") return mapping @@ -79,7 +88,14 @@ def convert_symbols_to_objects(self): if from_node.is_root: continue - found_node = next((to_node for to_node in to_tree.children if to_node.name == from_node.name), None) + found_node = next( + ( + to_node + for to_node in to_tree.children + if to_node.name == from_node.name + ), + None, + ) if found_node is None: to_tree.append(from_node) break @@ -93,7 +109,7 @@ def convert_symbols_to_objects(self): def apply_case_format(self, value: str, case_format: str) -> str: """Apply the specified case format to a string.""" if case_format == "snake_case": - return re.sub(r'(? str: def generate_need_id(self, reqobj) -> str: """Generates a unique identifier for a requirement object based on its type, package, - and its name using the format specified in the mapping file.""" + and its name using the format specified in the mapping file.""" req_type = reqobj.n_typ.name req_package = reqobj.n_package.name req_name = reqobj.name @@ -118,44 +134,67 @@ def generate_need_id(self, reqobj) -> str: # Get the casing formats id_case_format = self.type_mapping.get(req_type, {}).get("id_case_format", {}) - formatted_type = self.apply_case_format(mapped_type, id_case_format.get("type", "")) - formatted_package = self.apply_case_format(req_package, id_case_format.get("package", "")) - formatted_name = self.apply_case_format(req_name, id_case_format.get("name", "")) + formatted_type = self.apply_case_format( + mapped_type, id_case_format.get("type", "") + ) + formatted_package = self.apply_case_format( + req_package, id_case_format.get("package", "") + ) + formatted_name = self.apply_case_format( + req_name, id_case_format.get("name", "") + ) # Format the ID using the specified format - return id_format.format(type=formatted_type, package=formatted_package, name=formatted_name) + return id_format.format( + type=formatted_type, package=formatted_package, name=formatted_name + ) def generate_link_id_score(self, link, objects) -> str: """Generates a unique identifier for a link object based on its identifier and version, - using the same format as defined in generate_id_format.""" - linkobj = objects[link['item']] + using the same format as defined in generate_id_format.""" + linkobj = objects[link["item"]] # Use the same ID format for links return self.generate_need_id(linkobj) + f"@{link['LinkVersion']}" def get_link_attribute_value(self, value) -> str: """Generates the attribute value for link attributes.""" - return ', '.join(self.generate_link_id_score(v, self.req_objects) for v in value if v is not None) + return ", ".join( + self.generate_link_id_score(v, self.req_objects) + for v in value + if v is not None + ) def map_requirement_type(self, req_type: str) -> tuple: """Maps the requirement type using the loaded mapping or returns the original type and attributes.""" mapping = self.type_mapping.get(req_type) if mapping is None: - logging.debug(f"Type {req_type} not found in mapping, using {req_type} with default attributes.") - return req_type, [], [] # Return original type and empty attributes if not found + logging.debug( + f"Type {req_type} not found in mapping, using {req_type} with default attributes." + ) + return ( + req_type, + [], + [], + ) # Return original type and empty attributes if not found # Extract the mapped type, attributes, and links mapped_type = mapping.get("mapped_type", req_type) attributes = mapping.get("attributes", []) links = mapping.get("links", []) - return mapped_type, attributes, links # Return mapped type, attributes, and links + return ( + mapped_type, + attributes, + links, + ) # Return mapped type, attributes, and links + def _convert_to_title(self, identifier: str) -> str: - transformed_title="" + transformed_title = "" for i in identifier: if i.isupper(): - transformed_title+=" "+i + transformed_title += " " + i else: - transformed_title+=i + transformed_title += i return transformed_title.join(" ") def render_restructured_text_file(self): @@ -169,7 +208,9 @@ def render_restructured_text_file(self): if node.is_leaf: reqobj = self.req_objects[node.name] req_type = reqobj.n_typ.name # Get the requirement type - mapped_type, attributes_to_export, links_to_export = self.map_requirement_type(req_type) # Use mapping + mapped_type, attributes_to_export, links_to_export = ( + self.map_requirement_type(req_type) + ) # Use mapping title = self._convert_to_title(node.name) id = self.generate_need_id(reqobj) @@ -181,8 +222,8 @@ def render_restructured_text_file(self): reqobjpython_dict = reqobj.to_python_dict() for attr in attributes_to_export: # Split the attribute and default value if specified - if '=' in attr: - key, default_value = map(str.strip, attr.split('=', 1)) + if "=" in attr: + key, default_value = map(str.strip, attr.split("=", 1)) else: key, default_value = attr, "Not specified" @@ -198,12 +239,19 @@ def render_restructured_text_file(self): else: # Handle regular attributes if isinstance(value, list): - attr_val = ', '.join( - str(v) if not isinstance(v, dict) else ', '.join(f"{v2}" for v2 in v.values()) - for v in value if v is not None + attr_val = ", ".join( + str(v) + if not isinstance(v, dict) + else ", ".join(f"{v2}" for v2 in v.values()) + for v in value + if v is not None ) else: - attr_val = str(value) if not isinstance(value, dict) else ', '.join(f"{v2}" for v2 in value.values()) + attr_val = ( + str(value) + if not isinstance(value, dict) + else ", ".join(f"{v2}" for v2 in value.values()) + ) file.write(f" :{key}: {attr_val}\n") @@ -232,9 +280,13 @@ def run(self): def argument_parser() -> argparse.ArgumentParser: parser = argparse.ArgumentParser() parser.add_argument("-o", "--output", required=True, help="Output file path") - parser.add_argument("-m", "--mapping", help="Path to the JSON mapping file (optional)") - parser.add_argument("--debug", action='store_true', help="Enable debug output") - parser.add_argument("--debugpy", action='store_true', help="Enable debugpy for debugging") + parser.add_argument( + "-m", "--mapping", help="Path to the JSON mapping file (optional)" + ) + parser.add_argument("--debug", action="store_true", help="Enable debug output") + parser.add_argument( + "--debugpy", action="store_true", help="Enable debugpy for debugging" + ) return parser