format: Autoformat everything with buildifier

(except third_party/**)

Change-Id: Ieb09a6197ccc59012c0b716951ea7d2cdb849d1c
Reviewed-on: https://pigweed-review.googlesource.com/c/zephyr/zephyr-bazel/+/429459
diff --git a/MODULE.bazel b/MODULE.bazel
index 07a2f88..92188d2 100644
--- a/MODULE.bazel
+++ b/MODULE.bazel
@@ -56,58 +56,58 @@
 
 http_archive(
     name = "zephyr_sdk_arc",
-    urls = ["https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v1.0.1/toolchain_gnu_linux-x86_64_arc-zephyr-elf.tar.xz"],
+    build_file = "//toolchain/arc:zephyr_sdk_arc.BUILD",
     sha256 = "3b2c499772a6a56d8e72fda4db35d3f3443a75f287968fcf6e80657f3b4f48ca",
     strip_prefix = "arc-zephyr-elf",
-    build_file = "//toolchain/arc:zephyr_sdk_arc.BUILD",
+    urls = ["https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v1.0.1/toolchain_gnu_linux-x86_64_arc-zephyr-elf.tar.xz"],
 )
 
 http_archive(
     name = "zephyr_sdk_arm64",
-    urls = ["https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v1.0.1/toolchain_gnu_linux-x86_64_aarch64-zephyr-elf.tar.xz"],
+    build_file = "//toolchain/arm64:zephyr_sdk_arm64.BUILD",
     sha256 = "01c0cfe1daaab2d2a0f71165f11a066d983ef97e51c4a3753186afa6ae55c24b",
     strip_prefix = "aarch64-zephyr-elf",
-    build_file = "//toolchain/arm64:zephyr_sdk_arm64.BUILD",
+    urls = ["https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v1.0.1/toolchain_gnu_linux-x86_64_aarch64-zephyr-elf.tar.xz"],
 )
 
 http_archive(
     name = "zephyr_sdk_mips",
-    urls = ["https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v1.0.1/toolchain_gnu_linux-x86_64_mips-zephyr-elf.tar.xz"],
+    build_file = "//toolchain/mips:zephyr_sdk_mips.BUILD",
     sha256 = "6b0ee0f71bd1f2fd15d91950fced546b9542ba81dbcceff1456530ab95dac0bc",
     strip_prefix = "mips-zephyr-elf",
-    build_file = "//toolchain/mips:zephyr_sdk_mips.BUILD",
+    urls = ["https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v1.0.1/toolchain_gnu_linux-x86_64_mips-zephyr-elf.tar.xz"],
 )
 
 http_archive(
     name = "zephyr_sdk_riscv",
-    urls = ["https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v1.0.1/toolchain_gnu_linux-x86_64_riscv64-zephyr-elf.tar.xz"],
+    build_file = "//toolchain/riscv:zephyr_sdk_riscv.BUILD",
     sha256 = "01750834c471fbdb335c1b8b8aee17010a1968938957db85640c366235771a38",
     strip_prefix = "riscv64-zephyr-elf",
-    build_file = "//toolchain/riscv:zephyr_sdk_riscv.BUILD",
+    urls = ["https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v1.0.1/toolchain_gnu_linux-x86_64_riscv64-zephyr-elf.tar.xz"],
 )
 
 http_archive(
     name = "zephyr_sdk_rx",
-    urls = ["https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v1.0.1/toolchain_gnu_linux-x86_64_rx-zephyr-elf.tar.xz"],
+    build_file = "//toolchain/rx:zephyr_sdk_rx.BUILD",
     sha256 = "d3200cde7ab547094024900a6d289a62f0be05958d89131704d03e3e9499112d",
     strip_prefix = "rx-zephyr-elf",
-    build_file = "//toolchain/rx:zephyr_sdk_rx.BUILD",
+    urls = ["https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v1.0.1/toolchain_gnu_linux-x86_64_rx-zephyr-elf.tar.xz"],
 )
 
 http_archive(
     name = "zephyr_sdk_sparc",
-    urls = ["https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v1.0.1/toolchain_gnu_linux-x86_64_sparc-zephyr-elf.tar.xz"],
+    build_file = "//toolchain/sparc:zephyr_sdk_sparc.BUILD",
     sha256 = "d11759fbe6accf4106601c79864270494ab6b1e6539fd29e8223e8e124fa609e",
     strip_prefix = "sparc-zephyr-elf",
-    build_file = "//toolchain/sparc:zephyr_sdk_sparc.BUILD",
+    urls = ["https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v1.0.1/toolchain_gnu_linux-x86_64_sparc-zephyr-elf.tar.xz"],
 )
 
 http_archive(
     name = "zephyr_sdk_x86",
-    urls = ["https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v1.0.1/toolchain_gnu_linux-x86_64_x86_64-zephyr-elf.tar.xz"],
+    build_file = "//toolchain/x86:zephyr_sdk_x86.BUILD",
     sha256 = "960fd8d8690ce130b141736e494a7bae7da1f96956f8da405de66429670b62e9",
     strip_prefix = "x86_64-zephyr-elf",
-    build_file = "//toolchain/x86:zephyr_sdk_x86.BUILD",
+    urls = ["https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v1.0.1/toolchain_gnu_linux-x86_64_x86_64-zephyr-elf.tar.xz"],
 )
 
 python = use_extension("@rules_python//python/extensions:python.bzl", "python")
diff --git a/MODULE.bazel.lock b/MODULE.bazel.lock
index 7a8f36f..487acc4 100644
--- a/MODULE.bazel.lock
+++ b/MODULE.bazel.lock
@@ -857,7 +857,7 @@
     },
     "@@aspect_tools_telemetry+//:extension.bzl%telemetry": {
       "general": {
-        "bzlTransitiveDigest": "9U/UW6moiJI22q2ERFWJSK1omQJqmQgMYfWCWNL+SXk=",
+        "bzlTransitiveDigest": "+uYadwpPzPczG/Bq3p9AUVn7DGyCYrqS5r8Z91+zwVE=",
         "usagesDigest": "flGuT4IIo/Fpyi3mTPxutVaUt+jNBmbSklp1+eWc1bU=",
         "recordedFileInputs": {},
         "recordedDirentsInputs": {},
@@ -1420,7 +1420,7 @@
     },
     "@@rules_android+//rules/android_sdk_repository:rule.bzl%android_sdk_repository_extension": {
       "general": {
-        "bzlTransitiveDigest": "qHbR00gVzVzkxX+PRtv4UGcUFMtBz7TK9CNYUWH8nIE=",
+        "bzlTransitiveDigest": "HRZT2ph4uM9gmtIeJwSTwxWBIfU/yIw8RIOBs6v7pCo=",
         "usagesDigest": "tTIw/WMyb1t/LzacDY8lDjUznzxQ3MyXW6474WIS3WQ=",
         "recordedFileInputs": {},
         "recordedDirentsInputs": {},
diff --git a/bazel/elf_to_hex.bzl b/bazel/elf_to_hex.bzl
index bb1e7ef..1c44196 100644
--- a/bazel/elf_to_hex.bzl
+++ b/bazel/elf_to_hex.bzl
@@ -16,6 +16,7 @@
 
 load("@bazel_tools//tools/build_defs/cc:action_names.bzl", "ACTION_NAMES")
 load("@bazel_tools//tools/cpp:toolchain_utils.bzl", "find_cpp_toolchain")
+load("@rules_cc//cc/common:cc_common.bzl", "cc_common")
 
 def _elf_to_hex_impl(ctx):
     elf = ctx.file.src
diff --git a/bazel/private/kconfig_args.bzl b/bazel/private/kconfig_args.bzl
index 90875fa..7bf9178 100644
--- a/bazel/private/kconfig_args.bzl
+++ b/bazel/private/kconfig_args.bzl
@@ -27,7 +27,6 @@
         board_dirs = [],
         oot_dts_roots = [],
         conf_fragments = []):
-
     args = [
         str(script),
         "--zephyr-base",
diff --git a/bazel/private/zephyr_kconfig_gen_symbols.bzl b/bazel/private/zephyr_kconfig_gen_symbols.bzl
index 156fbda..c0d8789 100644
--- a/bazel/private/zephyr_kconfig_gen_symbols.bzl
+++ b/bazel/private/zephyr_kconfig_gen_symbols.bzl
@@ -13,9 +13,9 @@
 # the License.
 """Repository rule for the global Zephyr Kconfig schema."""
 
+load("//:naming.bzl", "resolve_module_roots")
 load("//bazel/private:kconfig_args.bzl", "get_kconfig_args")
 load("//bazel/private:repo_rule_python.bzl", "COMMON_PY_REPO_RULE_ATTRS", "get_python")
-load("//:naming.bzl", "resolve_module_roots")
 
 def _zephyr_kconfig_schema_impl(rctx):
     state_file = rctx.path(rctx.attr.state_file)
diff --git a/bazel/private/zephyr_transition.bzl b/bazel/private/zephyr_transition.bzl
index 58c3367..963443b 100644
--- a/bazel/private/zephyr_transition.bzl
+++ b/bazel/private/zephyr_transition.bzl
@@ -51,8 +51,8 @@
             prefix_b = platform_label.name + "/"
             qualified_variants = [b for b in cand_boards if b.startswith(prefix_b)]
             if qualified_variants:
-                fail("Board '%s' has multiple SoC variants. You must specify a variant. Valid variants: %s"
-                     % (platform_label.name, [v.split("/", 1)[1] for v in qualified_variants]))
+                fail("Board '%s' has multiple SoC variants. You must specify a variant. Valid variants: %s" %
+                     (platform_label.name, [v.split("/", 1)[1] for v in qualified_variants]))
             else:
                 board_id = platform_label.name
 
diff --git a/bazel/runfiles.bzl b/bazel/runfiles.bzl
index c27ace8..6bced23 100644
--- a/bazel/runfiles.bzl
+++ b/bazel/runfiles.bzl
@@ -40,5 +40,6 @@
     if path.startswith("../"):
         # Strip "../" to get "repo_name/path/to/file"
         return path[3:]
+
     # Prepend workspace name to get "workspace_name/path/to/file"
     return ctx.workspace_name + "/" + path
diff --git a/bazel/runner.bzl b/bazel/runner.bzl
index 54e9ec4..65e73f1 100644
--- a/bazel/runner.bzl
+++ b/bazel/runner.bzl
@@ -14,8 +14,8 @@
 
 """Rules and providers for Zephyr hardware runners configuration."""
 
-load("@zephyr-bazel//bazel/private:zephyr_transition.bzl", "zephyr_transition")
 load("@zephyr-bazel//bazel:runfiles.bzl", "resolve_runfiles_path")
+load("@zephyr-bazel//bazel/private:zephyr_transition.bzl", "zephyr_transition")
 
 ZephyrRunnerConfigInfo = provider(
     doc = "Carries configuration for Zephyr hardware runners.",
@@ -85,7 +85,7 @@
         DefaultInfo(
             files = depset([out_file]),
             runfiles = ctx.runfiles(files = runfiles_files),
-        )
+        ),
     ]
 
 zephyr_runners_yaml = rule(
@@ -121,4 +121,3 @@
     },
     cfg = zephyr_transition,
 )
-
diff --git a/bazel/sysbuild.bzl b/bazel/sysbuild.bzl
index c010476..ec67405 100644
--- a/bazel/sysbuild.bzl
+++ b/bazel/sysbuild.bzl
@@ -47,15 +47,15 @@
 
         platform = helper_config.get("platform")
         if platform:
-             t_name = "%s_helper_%s" % (name, helper_name)
-             transitioned_dep(
-                 name = t_name,
-                 dep = helper_target,
-                 platform = platform,
-             )
-             all_helpers_targets[helper_name] = ":" + t_name
+            t_name = "%s_helper_%s" % (name, helper_name)
+            transitioned_dep(
+                name = t_name,
+                dep = helper_target,
+                platform = platform,
+            )
+            all_helpers_targets[helper_name] = ":" + t_name
         else:
-             all_helpers_targets[helper_name] = helper_target
+            all_helpers_targets[helper_name] = helper_target
 
     # Helper for board-specific helpers
     for board_id, helpers in board_helpers.items():
@@ -68,12 +68,12 @@
             t_name = "%s_helper_%s_%s" % (name, helper_name, sanitize_board_id(board_id))
 
             if not platform:
-                 platform = "@zephyr//boards:%s" % board_id
+                platform = "@zephyr//boards:%s" % board_id
 
             transitioned_dep(
-                 name = t_name,
-                 dep = helper_target,
-                 platform = platform,
+                name = t_name,
+                dep = helper_target,
+                platform = platform,
             )
             all_helpers_targets["%s:%s" % (board_id, helper_name)] = ":" + t_name
 
@@ -83,9 +83,9 @@
     # Global helpers are always included
     base_helpers = []
     for helper_name in global_helpers.keys():
-         target = all_helpers_targets.get(helper_name)
-         if target:
-              base_helpers.append(target)
+        target = all_helpers_targets.get(helper_name)
+        if target:
+            base_helpers.append(target)
 
     select_dict["//conditions:default"] = base_helpers
 
@@ -95,9 +95,9 @@
 
         current_board_helpers = list(base_helpers)
         for helper_name in helpers.keys():
-             target = all_helpers_targets.get("%s:%s" % (board_id, helper_name))
-             if target:
-                  current_board_helpers.append(target)
+            target = all_helpers_targets.get("%s:%s" % (board_id, helper_name))
+            if target:
+                current_board_helpers.append(target)
 
         select_dict[board_condition] = current_board_helpers
 
diff --git a/bazel_overlay/BUILD.bazel b/bazel_overlay/BUILD.bazel
index 9cd0616..5fc3d98 100644
--- a/bazel_overlay/BUILD.bazel
+++ b/bazel_overlay/BUILD.bazel
@@ -17,7 +17,7 @@
 load("@zephyr-bazel//bazel:runner.bzl", "zephyr_runner_config")
 load("//:cc_toolchain_feature_is_enabled.bzl", "cc_toolchain_feature_is_enabled")
 load("//:defs.bzl", "device_api_linker_files", "driver_validation_file", "kobj_types_enum_file", "syscall_library_files", "zephyr_offset_header")
-load("//:linker_fragment.bzl", "generate_linker_snippets", "generate_app_smem_unaligned_linker", "zephyr_linker_fragment")
+load("//:linker_fragment.bzl", "generate_app_smem_unaligned_linker", "generate_linker_snippets", "zephyr_linker_fragment")
 
 package(default_visibility = ["//visibility:public"])
 
@@ -96,8 +96,8 @@
 
 zephyr_runner_config(
     name = "no_runner",
-    runner = "",
     args = [],
+    runner = "",
 )
 
 label_flag(
@@ -105,7 +105,6 @@
     build_setting_default = ":no_runner",
 )
 
-
 label_flag(
     name = "dts_cc_library",
     build_setting_default = ":zephyr_unspecified_backend",
@@ -243,7 +242,10 @@
 cc_library(
     name = "offsets_header_lib",
     hdrs = [":offsets_header"],
-    includes = [".", "zephyr"],
+    includes = [
+        ".",
+        "zephyr",
+    ],
 )
 
 cc_library(
diff --git a/bazel_overlay/arch/arc/BUILD.bazel b/bazel_overlay/arch/arc/BUILD.bazel
index 53707a3..ad1c17a 100644
--- a/bazel_overlay/arch/arc/BUILD.bazel
+++ b/bazel_overlay/arch/arc/BUILD.bazel
@@ -44,10 +44,10 @@
         "//:autoconf_library",
         "//:dts_cc_library",
         "//:heap_constants_lib",
+        "//:kobj_types_enum_h",
+        "//:syscall_list",
         "//include:zephyr",
         "//kernel:headers",
-        "//:syscall_list",
-        "//:kobj_types_enum_h",
     ],
     alwayslink = True,
 )
@@ -56,6 +56,7 @@
     name = "core_asm",
     srcs = [
         "core/cpu_idle.S",
+        "core/dsp/swap_dsp_macros.h",
         "core/fast_irq.S",
         "core/fault_s.S",
         "core/isr_wrapper.S",
@@ -64,7 +65,6 @@
         "core/switch.S",
         "core/thread_entry_wrapper.S",
         "core/userspace.S",
-        "core/dsp/swap_dsp_macros.h",
     ],
     local_defines = [
         "_ASMLANGUAGE",
diff --git a/bazel_overlay/arch/arm/core/cortex_m/BUILD.bazel b/bazel_overlay/arch/arm/core/cortex_m/BUILD.bazel
index a451f9c..98ea890 100644
--- a/bazel_overlay/arch/arm/core/cortex_m/BUILD.bazel
+++ b/bazel_overlay/arch/arm/core/cortex_m/BUILD.bazel
@@ -114,9 +114,9 @@
             "arm-m-switch.c",
         ],
         "//conditions:default": [
-            ":prepend_asm_swap_helper",
             "exc_exit.c",
             "thread_abort.c",
+            ":prepend_asm_swap_helper",
         ],
     }) + select({
         "@zephyr_kconfig//:CONFIG_ARM_CUSTOM_INTERRUPT_CONTROLLER=true": [],
diff --git a/bazel_overlay/arch/arm64/BUILD.bazel b/bazel_overlay/arch/arm64/BUILD.bazel
index 3540c06..ff267f7 100644
--- a/bazel_overlay/arch/arm64/BUILD.bazel
+++ b/bazel_overlay/arch/arm64/BUILD.bazel
@@ -44,10 +44,10 @@
         "//:autoconf_library",
         "//:dts_cc_library",
         "//:heap_constants_lib",
+        "//:kobj_types_enum_h",
+        "//:syscall_list",
         "//include:zephyr",
         "//kernel:headers",
-        "//:syscall_list",
-        "//:kobj_types_enum_h",
     ],
     alwayslink = True,
 )
@@ -55,19 +55,19 @@
 zephyr_cc_library(
     name = "core_asm",
     srcs = [
+        "core/boot.h",
         "core/early_mem_funcs.S",
         "core/fpu.S",
         "core/header.S",
         "core/isr_wrapper.S",
+        "core/macro_priv.inc",
         "core/mmu.S",
+        "core/mmu.h",
         "core/reset.S",
         "core/smccc-call.S",
         "core/switch.S",
         "core/userspace.S",
         "core/vector_table.S",
-        "core/macro_priv.inc",
-        "core/mmu.h",
-        "core/boot.h",
     ],
     local_defines = [
         "_ASMLANGUAGE",
@@ -77,20 +77,20 @@
 zephyr_cc_library(
     name = "core",
     srcs = [
+        "core/boot.h",
         "core/cpu_idle.c",
         "core/fatal.c",
         "core/fpu.c",
         "core/irq_init.c",
         "core/irq_manage.c",
         "core/mmu.c",
+        "core/paging.h",
         "core/prep_c.c",
         "core/reboot.c",
         "core/reset.c",
         "core/semihost.c",
         "core/smp.c",
         "core/thread.c",
-        "core/boot.h",
-        "core/paging.h",
     ] + select({
         "//conditions:default": [],
         "@zephyr_kconfig//:CONFIG_LLEXT=true": ["core/elf.c"],
@@ -103,7 +103,7 @@
     }),
     deps = [
         ":core_asm",
-        "//kernel",
         "//:syscall_list",
+        "//kernel",
     ],
 )
diff --git a/bazel_overlay/arch/mips/BUILD.bazel b/bazel_overlay/arch/mips/BUILD.bazel
index 31e5672..87fd299 100644
--- a/bazel_overlay/arch/mips/BUILD.bazel
+++ b/bazel_overlay/arch/mips/BUILD.bazel
@@ -44,10 +44,10 @@
         "//:autoconf_library",
         "//:dts_cc_library",
         "//:heap_constants_lib",
+        "//:kobj_types_enum_h",
+        "//:syscall_list",
         "//include:zephyr",
         "//kernel:headers",
-        "//:syscall_list",
-        "//:kobj_types_enum_h",
     ],
     alwayslink = True,
 )
@@ -72,10 +72,10 @@
     includes = ["include"],
     deps = [
         "//:autoconf_library",
-        "//include:zephyr",
-        "//:syscall_list",
-        "//kernel",
         "//:offsets_header_lib",
+        "//:syscall_list",
+        "//include:zephyr",
+        "//kernel",
     ],
     alwayslink = True,
 )
diff --git a/bazel_overlay/arch/riscv/BUILD.bazel b/bazel_overlay/arch/riscv/BUILD.bazel
index 4e7c82b..ba729a1 100644
--- a/bazel_overlay/arch/riscv/BUILD.bazel
+++ b/bazel_overlay/arch/riscv/BUILD.bazel
@@ -51,10 +51,10 @@
         "//:autoconf_library",
         "//:dts_cc_library",
         "//:heap_constants_lib",
+        "//:kobj_types_enum_h",
+        "//:syscall_list",
         "//include:zephyr",
         "//kernel:headers",
-        "//:syscall_list",
-        "//:kobj_types_enum_h",
     ],
     alwayslink = True,
 )
@@ -62,16 +62,16 @@
 zephyr_cc_library(
     name = "core",
     srcs = [
-        "core/reset.S",
-        "core/prep_c.c",
+        "core/asm_macros.inc",
+        "core/cpu_idle.c",
+        "core/fatal.c",
         "core/irq_manage.c",
         "core/isr.S",
-        "core/fatal.c",
-        "core/cpu_idle.c",
-        "core/thread.c",
-        "core/switch.S",
-        "core/asm_macros.inc",
+        "core/prep_c.c",
+        "core/reset.S",
         "core/stacktrace.c",
+        "core/switch.S",
+        "core/thread.c",
         "//:kobj_types_enum_h",
     ] + select({
         "//conditions:default": [],
@@ -79,16 +79,16 @@
     }) + select({
         "//conditions:default": [],
         "@zephyr_kconfig//:CONFIG_RISCV_PMP=true": [
-            "core/pmp.c",
             "core/pmp.S",
+            "core/pmp.c",
         ],
     }),
     copts = ["-include zephyr/autoconf.h"],
     includes = ["include"],
     deps = [
         "//:autoconf_library",
-        "//include:zephyr",
         "//:syscall_list",
+        "//include:zephyr",
         "//kernel",
     ],
     alwayslink = True,
diff --git a/bazel_overlay/arch/rx/BUILD.bazel b/bazel_overlay/arch/rx/BUILD.bazel
index f32e986..61cfa51 100644
--- a/bazel_overlay/arch/rx/BUILD.bazel
+++ b/bazel_overlay/arch/rx/BUILD.bazel
@@ -44,10 +44,10 @@
         "//:autoconf_library",
         "//:dts_cc_library",
         "//:heap_constants_lib",
+        "//:kobj_types_enum_h",
+        "//:syscall_list",
         "//include:zephyr",
         "//kernel:headers",
-        "//:syscall_list",
-        "//:kobj_types_enum_h",
     ],
     alwayslink = True,
 )
@@ -55,17 +55,17 @@
 zephyr_cc_library(
     name = "core",
     srcs = [
-        "core/switch.S",
         "core/cpu_idle.c",
-        "core/prep_c.c",
+        "core/fatal.c",
         "core/irq_manage.c",
+        "core/isr_exit.S",
+        "core/nmi.c",
+        "core/prep_c.c",
+        "core/reboot.c",
         "core/reset.S",
+        "core/switch.S",
         "core/thread.c",
         "core/vects.c",
-        "core/isr_exit.S",
-        "core/fatal.c",
-        "core/reboot.c",
-        "core/nmi.c",
         "//:kobj_types_enum_h",
     ],
     copts = [
@@ -75,8 +75,8 @@
     includes = ["include"],
     deps = [
         "//:autoconf_library",
-        "//include:zephyr",
         "//:syscall_list",
+        "//include:zephyr",
         "//kernel",
     ],
     alwayslink = True,
diff --git a/bazel_overlay/arch/sparc/BUILD.bazel b/bazel_overlay/arch/sparc/BUILD.bazel
index ca4c0ae..6f015cf 100644
--- a/bazel_overlay/arch/sparc/BUILD.bazel
+++ b/bazel_overlay/arch/sparc/BUILD.bazel
@@ -43,11 +43,11 @@
     deps = [
         "//:autoconf_library",
         "//:dts_cc_library",
-        "//include:zephyr",
-        "//kernel:headers",
-        "//:syscall_list",
         "//:kobj_types_enum_h",
         "//:soc",
+        "//:syscall_list",
+        "//include:zephyr",
+        "//kernel:headers",
     ],
     alwayslink = True,
 )
@@ -56,16 +56,16 @@
     name = "core",
     srcs = [
         "core/fatal.c",
-        "core/reset_trap.S",
-        "core/prep_c.c",
-        "core/switch.S",
-        "core/interrupt_trap.S",
         "core/fault_trap.S",
+        "core/interrupt_trap.S",
         "core/irq_manage.c",
+        "core/prep_c.c",
+        "core/reset_trap.S",
+        "core/stack_offsets.h",
+        "core/sw_trap_set_pil.S",
+        "core/switch.S",
         "core/thread.c",
         "core/window_trap.S",
-        "core/sw_trap_set_pil.S",
-        "core/stack_offsets.h",
         "//:kobj_types_enum_h",
     ] + select({
         "@zephyr_kconfig//:CONFIG_SPARC_SVT=true": ["core/trap_table_svt.S"],
@@ -78,8 +78,8 @@
     includes = ["include"],
     deps = [
         "//:autoconf_library",
-        "//include:zephyr",
         "//:syscall_list",
+        "//include:zephyr",
         "//kernel",
     ],
     alwayslink = True,
diff --git a/bazel_overlay/arch/x86/BUILD.bazel b/bazel_overlay/arch/x86/BUILD.bazel
index 8415d14..a297305 100644
--- a/bazel_overlay/arch/x86/BUILD.bazel
+++ b/bazel_overlay/arch/x86/BUILD.bazel
@@ -12,9 +12,9 @@
 # License for the specific language governing permissions and limitations under
 # the License.
 
+load("@bazel_skylib//lib:selects.bzl", "selects")
 load("@rules_cc//cc:cc_library.bzl", "cc_library")
 load("//:cc.bzl", "zephyr_cc_library")
-load("@bazel_skylib//lib:selects.bzl", "selects")
 
 package(default_visibility = ["//visibility:public"])
 
@@ -35,24 +35,24 @@
     srcs = [
         "core/offsets/offsets.c",
     ],
-    textual_hdrs = [
-        "core/offsets/intel64_offsets.c",
-        "core/offsets/ia32_offsets.c",
-    ],
     hdrs = glob(["include/**/*.h"]) + ["@zephyr//include/zephyr/arch/x86:x86_hdrs"],
     copts = ["-include zephyr/autoconf.h"],
     includes = [
         "core/offsets",
         "include",
     ],
+    textual_hdrs = [
+        "core/offsets/intel64_offsets.c",
+        "core/offsets/ia32_offsets.c",
+    ],
     deps = [
         "//:autoconf_library",
         "//:dts_cc_library",
         "//:heap_constants_lib",
+        "//:kobj_types_enum_h",
+        "//:syscall_list",
         "//include:zephyr",
         "//kernel:headers",
-        "//:syscall_list",
-        "//:kobj_types_enum_h",
     ],
     alwayslink = True,
 )
@@ -108,7 +108,7 @@
             "core/intel64/thread.c",
             "core/intel64/fatal.c",
         ],
-        "//conditions:default": [], # We don't support ia32 yet
+        "//conditions:default": [],  # We don't support ia32 yet
     }) + select({
         "//conditions:default": [],
         "@zephyr_kconfig//:CONFIG_SMP=true": ["core/intel64/smp.c"],
@@ -144,7 +144,10 @@
         "@zephyr_kconfig//:CONFIG_X86_EFI=true": ["core/efi.c"],
     }) + select({
         "//conditions:default": [],
-        "@zephyr_kconfig//:CONFIG_ACPI=true": ["core/legacy_bios.c", "core/x86_acpi.c"],
+        "@zephyr_kconfig//:CONFIG_ACPI=true": [
+            "core/legacy_bios.c",
+            "core/x86_acpi.c",
+        ],
     }) + select({
         "//conditions:default": [],
         "@zephyr_kconfig//:CONFIG_X86_MMU=true": ["core/x86_mmu.c"],
@@ -164,15 +167,15 @@
         "//conditions:default": [],
         "@zephyr_kconfig//:CONFIG_X86_CET=true": ["core/cet.c"],
     }),
+    copts = ["-include zephyr/autoconf.h"],
+    includes = ["include"],
     textual_hdrs = [
         "core/common.S",
     ],
-    copts = ["-include zephyr/autoconf.h"],
-    includes = ["include"],
     deps = [
         "//:autoconf_library",
-        "//include:zephyr",
         "//:syscall_list",
+        "//include:zephyr",
         "//kernel",
     ],
     alwayslink = True,
diff --git a/bazel_overlay/boards/nordic/nrf52833dk/BUILD.bazel b/bazel_overlay/boards/nordic/nrf52833dk/BUILD.bazel
index fe9f27a..b7247e4 100644
--- a/bazel_overlay/boards/nordic/nrf52833dk/BUILD.bazel
+++ b/bazel_overlay/boards/nordic/nrf52833dk/BUILD.bazel
@@ -46,6 +46,7 @@
     name = "nordic_nrf52833dk",
     constraint_setting = "@zephyr//boards:board_name",
 )
+
 cc_library(
     name = "hal_soc_headers_library",
     deps = [
@@ -56,14 +57,20 @@
 
 zephyr_runner_config(
     name = "nrf52833_runner",
+    args = [
+        "--device=nRF52833_xxAA",
+        "--speed=4000",
+    ],
     runner = "jlink",
-    args = ["--device=nRF52833_xxAA", "--speed=4000"],
 )
 
 zephyr_runner_config(
     name = "nrf52820_runner",
+    args = [
+        "--device=nRF52820_xxAA",
+        "--speed=4000",
+    ],
     runner = "jlink",
-    args = ["--device=nRF52820_xxAA", "--speed=4000"],
 )
 
 platform(
diff --git a/bazel_overlay/boards/qemu/arc/BUILD.bazel b/bazel_overlay/boards/qemu/arc/BUILD.bazel
index f19c9cf..14c8118 100644
--- a/bazel_overlay/boards/qemu/arc/BUILD.bazel
+++ b/bazel_overlay/boards/qemu/arc/BUILD.bazel
@@ -12,9 +12,9 @@
 # License for the specific language governing permissions and limitations under
 # the License.
 
-load("//:flags.bzl", "flags_from_dict")
-load("//:defs.bzl", "dts_cc_library", "dts_library")
 load("//:cc.bzl", "zephyr_cc_library")
+load("//:defs.bzl", "dts_cc_library", "dts_library")
+load("//:flags.bzl", "flags_from_dict")
 
 package(default_visibility = ["//visibility:public"])
 
diff --git a/bazel_overlay/boards/qemu/cortex_a53/BUILD.bazel b/bazel_overlay/boards/qemu/cortex_a53/BUILD.bazel
index 9cb99c2..fb2cc7f 100644
--- a/bazel_overlay/boards/qemu/cortex_a53/BUILD.bazel
+++ b/bazel_overlay/boards/qemu/cortex_a53/BUILD.bazel
@@ -12,8 +12,8 @@
 # License for the specific language governing permissions and limitations under
 # the License.
 
-load("//:flags.bzl", "flags_from_dict")
 load("//:defs.bzl", "dts_cc_library", "dts_library")
+load("//:flags.bzl", "flags_from_dict")
 
 package(default_visibility = ["//visibility:public"])
 
diff --git a/bazel_overlay/boards/qemu/malta/BUILD.bazel b/bazel_overlay/boards/qemu/malta/BUILD.bazel
index 91b7e59..9fbdc54 100644
--- a/bazel_overlay/boards/qemu/malta/BUILD.bazel
+++ b/bazel_overlay/boards/qemu/malta/BUILD.bazel
@@ -12,8 +12,8 @@
 # License for the specific language governing permissions and limitations under
 # the License.
 
-load("//:flags.bzl", "flags_from_dict")
 load("//:defs.bzl", "dts_cc_library", "dts_library")
+load("//:flags.bzl", "flags_from_dict")
 
 package(default_visibility = ["//visibility:public"])
 
diff --git a/bazel_overlay/boards/qemu/riscv32/BUILD.bazel b/bazel_overlay/boards/qemu/riscv32/BUILD.bazel
index 8a96d80..d00e058 100644
--- a/bazel_overlay/boards/qemu/riscv32/BUILD.bazel
+++ b/bazel_overlay/boards/qemu/riscv32/BUILD.bazel
@@ -12,8 +12,8 @@
 # License for the specific language governing permissions and limitations under
 # the License.
 
-load("//:flags.bzl", "flags_from_dict")
 load("//:defs.bzl", "dts_cc_library", "dts_library")
+load("//:flags.bzl", "flags_from_dict")
 
 package(default_visibility = ["//visibility:public"])
 
diff --git a/bazel_overlay/boards/qemu/rx/BUILD.bazel b/bazel_overlay/boards/qemu/rx/BUILD.bazel
index a075cbf..d45eccc 100644
--- a/bazel_overlay/boards/qemu/rx/BUILD.bazel
+++ b/bazel_overlay/boards/qemu/rx/BUILD.bazel
@@ -12,8 +12,8 @@
 # License for the specific language governing permissions and limitations under
 # the License.
 
-load("//:flags.bzl", "flags_from_dict")
 load("//:defs.bzl", "dts_cc_library", "dts_library")
+load("//:flags.bzl", "flags_from_dict")
 
 package(default_visibility = ["//visibility:public"])
 
diff --git a/bazel_overlay/boards/qemu/x86/BUILD.bazel b/bazel_overlay/boards/qemu/x86/BUILD.bazel
index 582acd1..2ae5ba9 100644
--- a/bazel_overlay/boards/qemu/x86/BUILD.bazel
+++ b/bazel_overlay/boards/qemu/x86/BUILD.bazel
@@ -12,8 +12,8 @@
 # License for the specific language governing permissions and limitations under
 # the License.
 
-load("//:flags.bzl", "flags_from_dict")
 load("//:defs.bzl", "dts_cc_library", "dts_library")
+load("//:flags.bzl", "flags_from_dict")
 
 package(default_visibility = ["//visibility:public"])
 
diff --git a/bazel_overlay/boards/raspberrypi/rpi_pico/BUILD.bazel b/bazel_overlay/boards/raspberrypi/rpi_pico/BUILD.bazel
index 1675a10..ca56ae5 100644
--- a/bazel_overlay/boards/raspberrypi/rpi_pico/BUILD.bazel
+++ b/bazel_overlay/boards/raspberrypi/rpi_pico/BUILD.bazel
@@ -22,16 +22,19 @@
 
 zephyr_runner_config(
     name = "rp2040_runner",
-    runner = "openocd",
     args = [
-        "--cmd-pre-init", "source [find interface/cmsis-dap.cfg]",
-        "--cmd-pre-init", "transport select swd",
-        "--cmd-pre-init", "source [find target/rp2040.cfg]",
-        "--cmd-pre-init", "set_adapter_speed_if_not_set 2000",
+        "--cmd-pre-init",
+        "source [find interface/cmsis-dap.cfg]",
+        "--cmd-pre-init",
+        "transport select swd",
+        "--cmd-pre-init",
+        "source [find target/rp2040.cfg]",
+        "--cmd-pre-init",
+        "set_adapter_speed_if_not_set 2000",
     ],
+    runner = "openocd",
 )
 
-
 constraint_value(
     name = "raspberrypi_rpi_pico",
     constraint_setting = "@zephyr//boards:board_name",
diff --git a/bazel_overlay/boards/raspberrypi/rpi_pico2/BUILD.bazel b/bazel_overlay/boards/raspberrypi/rpi_pico2/BUILD.bazel
index ec8cede..ff297b5 100644
--- a/bazel_overlay/boards/raspberrypi/rpi_pico2/BUILD.bazel
+++ b/bazel_overlay/boards/raspberrypi/rpi_pico2/BUILD.bazel
@@ -22,16 +22,19 @@
 
 zephyr_runner_config(
     name = "rp2350a_m33_runner",
-    runner = "openocd",
     args = [
-        "--cmd-pre-init", "source [find interface/cmsis-dap.cfg]",
-        "--cmd-pre-init", "transport select swd",
-        "--cmd-pre-init", "source [find target/rp2350.cfg]",
-        "--cmd-pre-init", "set_adapter_speed_if_not_set 5000",
+        "--cmd-pre-init",
+        "source [find interface/cmsis-dap.cfg]",
+        "--cmd-pre-init",
+        "transport select swd",
+        "--cmd-pre-init",
+        "source [find target/rp2350.cfg]",
+        "--cmd-pre-init",
+        "set_adapter_speed_if_not_set 5000",
     ],
+    runner = "openocd",
 )
 
-
 constraint_value(
     name = "raspberrypi_rpi_pico2",
     constraint_setting = "@zephyr//boards:board_name",
diff --git a/bazel_overlay/cc.bzl b/bazel_overlay/cc.bzl
index ca9530b..cd2a79d 100644
--- a/bazel_overlay/cc.bzl
+++ b/bazel_overlay/cc.bzl
@@ -15,17 +15,17 @@
 load("@bazel_skylib//rules:copy_file.bzl", "copy_file")
 load("@rules_cc//cc:cc_binary.bzl", "cc_binary")
 load("@rules_cc//cc:cc_library.bzl", "cc_library")
+load("@zephyr//:defs.bzl", "gen_kobject_placeholders", "userspace_gperf_hash_files")
 load("@zephyr//:errno.bzl", "ZEPHYR_ERRNO")
-load("@zephyr//bazel/compiler/gcc:compiler_flags.bzl", "GCC_ARM_C_FLAGS")
-load("@zephyr-bazel//bazel:elf_to_hex.bzl", "elf_to_hex")
-load("@zephyr-bazel//bazel/private:zephyr_transition.bzl", "zephyr_transition")
-load("@zephyr-bazel//bazel:runner.bzl", "zephyr_runners_yaml")
-load("@zephyr-bazel//bazel:runfiles.bzl", "resolve_runfiles_path")
-load("@zephyr_kconfig//:local_modules.bzl", "LOCAL_MODULES")
-load("@zephyr//:defs.bzl", "userspace_gperf_hash_files", "gen_kobject_placeholders")
 load("@zephyr//:linker_fragment.bzl", "generate_app_smem_aligned_linker")
 load("@zephyr//:rename_kobject_hash_sections.bzl", "rename_kobject_sections")
 load("@zephyr//:zephyr_linker_script.bzl", "zephyr_linker_script")
+load("@zephyr//bazel/compiler/gcc:compiler_flags.bzl", "GCC_ARM_C_FLAGS")
+load("@zephyr-bazel//bazel:elf_to_hex.bzl", "elf_to_hex")
+load("@zephyr-bazel//bazel:runfiles.bzl", "resolve_runfiles_path")
+load("@zephyr-bazel//bazel:runner.bzl", "zephyr_runners_yaml")
+load("@zephyr-bazel//bazel/private:zephyr_transition.bzl", "zephyr_transition")
+load("@zephyr_kconfig//:local_modules.bzl", "LOCAL_MODULES")
 
 def if_compiler_is_clang(then, *, otherwise = []):
     return select({
@@ -280,8 +280,8 @@
         pkg = native.package_name()
         if (pkg + ":" + name) in _LOCAL_MODULES_MAP:
             fail(("\nERROR: Target //%s:%s is registered as a Zephyr module.\n" +
-                 "You must define it using the 'zephyr_module' macro instead of 'zephyr_cc_library' " +
-                 "to ensure correct Kconfig gating.") % (pkg, name))
+                  "You must define it using the 'zephyr_module' macro instead of 'zephyr_cc_library' " +
+                  "to ensure correct Kconfig gating.") % (pkg, name))
 
     _zephyr_library_impl(
         name = name,
@@ -289,7 +289,6 @@
         **kwargs
     )
 
-
 def zephyr_module(*, name, config, srcs = [], deps = [], use_libc = True, **kwargs):
     """Defines a Zephyr module with Kconfig gating and a marker target.
 
@@ -337,8 +336,6 @@
         **dict(remaining_kwargs, **gated_args)
     )
 
-
-
 def _zephyr_cc_binary(*, name, deps = [], **kwargs):
     """
     A macro that creates a cc_binary with Zephyr-specific dependencies and options.
@@ -471,6 +468,7 @@
         ],
         testonly = testonly,
     )
+
     # Right now "linker_final_with_userspace" is the same as "linker_final".
     # In a later CL, "linker_final_with_userspace" will depend on linker
     # snippets generated from kernel objects.
@@ -626,7 +624,6 @@
             "//conditions:default": cmd_le,
         })
 
-
     # Define output_locations
     no_sw_isr_no_vector_outs = [
         "{}._no_sw_isr_no_vector/isr_table.c".format(name),
diff --git a/bazel_overlay/cc_test.bzl b/bazel_overlay/cc_test.bzl
index 1204d5d..799193d 100644
--- a/bazel_overlay/cc_test.bzl
+++ b/bazel_overlay/cc_test.bzl
@@ -14,9 +14,9 @@
 
 """Defines the zephyr_cc_unit_test rule."""
 
-load("@zephyr//:cc.bzl", "zephyr_app", "zephyr_cc_library")
-load("@rules_python//python:py_test.bzl", "py_test")
 load("@bazel_skylib//rules:copy_file.bzl", "copy_file")
+load("@rules_python//python:py_test.bzl", "py_test")
+load("@zephyr//:cc.bzl", "zephyr_app", "zephyr_cc_library")
 
 def zephyr_cc_test(**kw_args):
     """Creates a Zephyr test library for use with a test runner."""
@@ -28,8 +28,14 @@
         **kw_args
     )
 
-def ztest(name, deps, tags = None, visibility = None, stop_at = 10,
-          success_signature = "PROJECT EXECUTION SUCCESSFUL", **kwargs):
+def ztest(
+        name,
+        deps,
+        tags = None,
+        visibility = None,
+        stop_at = 10,
+        success_signature = "PROJECT EXECUTION SUCCESSFUL",
+        **kwargs):
     """Creates a Zephyr ZTest target runnable with `bazel test`.
 
     This macro compiles the target application binary under the hood and wraps
@@ -119,4 +125,3 @@
         ],
         visibility = visibility,
     )
-
diff --git a/bazel_overlay/defs.bzl b/bazel_overlay/defs.bzl
index 8d7ecaf..8e21c2a 100644
--- a/bazel_overlay/defs.bzl
+++ b/bazel_overlay/defs.bzl
@@ -601,12 +601,16 @@
         inputs = [obj_file],
         executable = ctx.executable._gen_kobject_placeholders,
         arguments = [
-            "--object", obj_file.path,
-            "--outdir", out_dir.path,
+            "--object",
+            obj_file.path,
+            "--outdir",
+            out_dir.path,
             # TODO: Double-check these number literals. They may need to come
             # from Kconfig in rare cases.
-            "--datapct", "100",
-            "--rodata", "16",
+            "--datapct",
+            "100",
+            "--rodata",
+            "16",
         ],
         mnemonic = "GenerateAppSmemLd",
     )
@@ -626,11 +630,10 @@
         CcInfo(compilation_context = compilation_context),
     ]
 
-
 gen_kobject_placeholders = rule(
     implementation = _gen_kobject_placeholders_impl,
     attrs = {
-        "kobj_prebuilt_hash_lib": attr.label(mandatory=True, providers = [CcInfo]),
+        "kobj_prebuilt_hash_lib": attr.label(mandatory = True, providers = [CcInfo]),
         "_gen_kobject_placeholders": attr.label(
             default = "//scripts/build:gen_kobject_placeholders",
             executable = True,
diff --git a/bazel_overlay/dts/BUILD.bazel b/bazel_overlay/dts/BUILD.bazel
index c1434a1..3b80e3e 100644
--- a/bazel_overlay/dts/BUILD.bazel
+++ b/bazel_overlay/dts/BUILD.bazel
@@ -27,11 +27,11 @@
         ".",
         "arm",
         "common",
-        "vendor",
-        "xtensa",
         "riscv",
         "rx",
         "sparc",
+        "vendor",
         "x86",
+        "xtensa",
     ],
 )
diff --git a/bazel_overlay/include/zephyr/arch/arm/cortex_m/scripts/BUILD.bazel b/bazel_overlay/include/zephyr/arch/arm/cortex_m/scripts/BUILD.bazel
index a6ed086..1591d94 100644
--- a/bazel_overlay/include/zephyr/arch/arm/cortex_m/scripts/BUILD.bazel
+++ b/bazel_overlay/include/zephyr/arch/arm/cortex_m/scripts/BUILD.bazel
@@ -12,8 +12,7 @@
 # License for the specific language governing permissions and limitations under
 # the License.
 
-load("//:cc.bzl", "if_compiler_is_clang", "if_compiler_is_gcc")
-load("//:zephyr_linker_script.bzl", "zephyr_linker_script")
+load("@rules_cc//cc:cc_library.bzl", "cc_library")
 
 package(default_visibility = ["//visibility:public"])
 
diff --git a/bazel_overlay/include/zephyr/arch/mips/BUILD.bazel b/bazel_overlay/include/zephyr/arch/mips/BUILD.bazel
index 8251046..7977daa 100644
--- a/bazel_overlay/include/zephyr/arch/mips/BUILD.bazel
+++ b/bazel_overlay/include/zephyr/arch/mips/BUILD.bazel
@@ -12,6 +12,8 @@
 # License for the specific language governing permissions and limitations under
 # the License.
 
+load("@rules_cc//cc:cc_library.bzl", "cc_library")
+
 package(default_visibility = ["//visibility:public"])
 
 cc_library(
diff --git a/bazel_overlay/include/zephyr/arch/riscv/BUILD.bazel b/bazel_overlay/include/zephyr/arch/riscv/BUILD.bazel
index f5cea9b..a6019a0 100644
--- a/bazel_overlay/include/zephyr/arch/riscv/BUILD.bazel
+++ b/bazel_overlay/include/zephyr/arch/riscv/BUILD.bazel
@@ -12,6 +12,8 @@
 # License for the specific language governing permissions and limitations under
 # the License.
 
+load("@rules_cc//cc:cc_library.bzl", "cc_library")
+
 package(default_visibility = ["//visibility:public"])
 
 cc_library(
diff --git a/bazel_overlay/include/zephyr/arch/rx/BUILD.bazel b/bazel_overlay/include/zephyr/arch/rx/BUILD.bazel
index 4a9af48..2ec6e21 100644
--- a/bazel_overlay/include/zephyr/arch/rx/BUILD.bazel
+++ b/bazel_overlay/include/zephyr/arch/rx/BUILD.bazel
@@ -12,6 +12,8 @@
 # License for the specific language governing permissions and limitations under
 # the License.
 
+load("@rules_cc//cc:cc_library.bzl", "cc_library")
+
 package(default_visibility = ["//visibility:public"])
 
 cc_library(
diff --git a/bazel_overlay/include/zephyr/arch/sparc/BUILD.bazel b/bazel_overlay/include/zephyr/arch/sparc/BUILD.bazel
index 8584fac..14b2a8b 100644
--- a/bazel_overlay/include/zephyr/arch/sparc/BUILD.bazel
+++ b/bazel_overlay/include/zephyr/arch/sparc/BUILD.bazel
@@ -12,6 +12,8 @@
 # License for the specific language governing permissions and limitations under
 # the License.
 
+load("@rules_cc//cc:cc_library.bzl", "cc_library")
+
 package(default_visibility = ["//visibility:public"])
 
 cc_library(
diff --git a/bazel_overlay/include/zephyr/arch/x86/BUILD.bazel b/bazel_overlay/include/zephyr/arch/x86/BUILD.bazel
index d7363bc..c764e06 100644
--- a/bazel_overlay/include/zephyr/arch/x86/BUILD.bazel
+++ b/bazel_overlay/include/zephyr/arch/x86/BUILD.bazel
@@ -12,6 +12,8 @@
 # License for the specific language governing permissions and limitations under
 # the License.
 
+load("@rules_cc//cc:cc_library.bzl", "cc_library")
+
 package(default_visibility = ["//visibility:public"])
 
 cc_library(
diff --git a/bazel_overlay/kernel/BUILD.bazel b/bazel_overlay/kernel/BUILD.bazel
index 7062969..d49934e 100644
--- a/bazel_overlay/kernel/BUILD.bazel
+++ b/bazel_overlay/kernel/BUILD.bazel
@@ -22,10 +22,10 @@
     name = "headers",
     hdrs = glob(["include/**/*.h"]),
     copts = ["-include zephyr/autoconf.h"],
-    includes = ["include"],
     defines = [
         "K_HEAP_MEM_POOL_SIZE=CONFIG_HEAP_MEM_POOL_SIZE",
     ],
+    includes = ["include"],
     deps = [
         "//:autoconf_library",
         "//include:zephyr",
@@ -65,8 +65,8 @@
     }) + select({
         "//conditions:default": [],
         "@zephyr_kconfig//:CONFIG_SMP=true": [
-            "smp.c",
             "ipi.c",
+            "smp.c",
         ],
     }) + select({
         "//conditions:default": [],
diff --git a/bazel_overlay/lib/libc/minimal/BUILD.bazel b/bazel_overlay/lib/libc/minimal/BUILD.bazel
index 079a6e4..548b344 100644
--- a/bazel_overlay/lib/libc/minimal/BUILD.bazel
+++ b/bazel_overlay/lib/libc/minimal/BUILD.bazel
@@ -80,14 +80,14 @@
         "-fno-builtin",
         "-fno-lto",
     ],
-    local_defines = [
-        # Workaround. This should come from include/zephyr/toolchain/gcc.h
-        # but we haven't figured out how to give that file to the compiler.
-        "ZRESTRICT=__restrict",
-    ],
     includes = [
         ".",
         "include",
         "//include",
     ],
+    local_defines = [
+        # Workaround. This should come from include/zephyr/toolchain/gcc.h
+        # but we haven't figured out how to give that file to the compiler.
+        "ZRESTRICT=__restrict",
+    ],
 )
diff --git a/bazel_overlay/lib/posix/c_lib_ext/BUILD.bazel b/bazel_overlay/lib/posix/c_lib_ext/BUILD.bazel
index 78f669d..ea34e82 100644
--- a/bazel_overlay/lib/posix/c_lib_ext/BUILD.bazel
+++ b/bazel_overlay/lib/posix/c_lib_ext/BUILD.bazel
@@ -1,6 +1,7 @@
 # SPDX-License-Identifier: Apache-2.0
 
 load("//:cc.bzl", "zephyr_cc_library")
+load("@rules_cc//cc:cc_library.bzl", "cc_library")
 
 package(default_visibility = ["//:__subpackages__"])
 
@@ -33,6 +34,9 @@
 # in the current Bazel package.
 cc_library(
     name = "c_lib_ext_zephyr_includes",
-    hdrs = glob(["getopt/**/*.h"], allow_empty=True),
+    hdrs = glob(
+        ["getopt/**/*.h"],
+        allow_empty = True,
+    ),
     strip_include_prefix = "getopt",
 )
diff --git a/bazel_overlay/linker_fragment.bzl b/bazel_overlay/linker_fragment.bzl
index 70daa64..81b72b0 100644
--- a/bazel_overlay/linker_fragment.bzl
+++ b/bazel_overlay/linker_fragment.bzl
@@ -237,7 +237,7 @@
         # If you hit this error and need to debug, the accumulated partitions
         # dictionary in the script should look something like this:
         # [
-        # ('z_libc_partition', {'size': 156, 'libraries': ['libc.a']}), 
+        # ('z_libc_partition', {'size': 156, 'libraries': ['libc.a']}),
         # ('z_malloc_partition', {'size': 6144}),
         # ('ztest_mem_partition', {'size': 23}),
         # ]
diff --git a/bazel_overlay/rename_kobject_hash_sections.bzl b/bazel_overlay/rename_kobject_hash_sections.bzl
index de7ba2f..c97ed40 100644
--- a/bazel_overlay/rename_kobject_hash_sections.bzl
+++ b/bazel_overlay/rename_kobject_hash_sections.bzl
@@ -15,6 +15,7 @@
 load("@bazel_tools//tools/build_defs/cc:action_names.bzl", "ACTION_NAMES")
 load("@bazel_tools//tools/cpp:toolchain_utils.bzl", "find_cpp_toolchain")
 load("@rules_cc//cc/common:cc_info.bzl", "CcInfo")
+load("@rules_cc//cc/common:cc_common.bzl", "cc_common")
 
 def _rename_kobject_sections_impl(ctx):
     # Collect input kobject object file.
@@ -82,8 +83,8 @@
             cc_common.create_linker_input(
                 owner = ctx.label,
                 libraries = depset([library_to_link]),
-            )
-        ])
+            ),
+        ]),
     )
 
     return [
diff --git a/bazel_overlay/scripts/BUILD.bazel b/bazel_overlay/scripts/BUILD.bazel
index c990ef6..fd495dd 100644
--- a/bazel_overlay/scripts/BUILD.bazel
+++ b/bazel_overlay/scripts/BUILD.bazel
@@ -21,4 +21,3 @@
     ]),
     visibility = ["//visibility:public"],
 )
-
diff --git a/bazel_overlay/soc/cdns/dc233c/BUILD.bazel b/bazel_overlay/soc/cdns/dc233c/BUILD.bazel
index 3ab0e2a..31367a1 100644
--- a/bazel_overlay/soc/cdns/dc233c/BUILD.bazel
+++ b/bazel_overlay/soc/cdns/dc233c/BUILD.bazel
@@ -13,7 +13,6 @@
 # the License.
 
 load("@rules_cc//cc:cc_library.bzl", "cc_library")
-load("//:zephyr_linker_script.bzl", "zephyr_linker_script")
 
 cc_library(
     name = "backtrace_helpers",
diff --git a/examples/BUILD.bazel b/examples/BUILD.bazel
index b946126..2328931 100644
--- a/examples/BUILD.bazel
+++ b/examples/BUILD.bazel
@@ -13,7 +13,6 @@
 # the License.
 
 load("@bazel_skylib//rules:native_binary.bzl", "native_binary")
-load("@rules_python//python:defs.bzl", "py_test")
 
 package(default_visibility = ["//visibility:public"])
 
diff --git a/examples/hello_dts_overlays/BUILD.bazel b/examples/hello_dts_overlays/BUILD.bazel
index 1e289f9..b529c4e 100644
--- a/examples/hello_dts_overlays/BUILD.bazel
+++ b/examples/hello_dts_overlays/BUILD.bazel
@@ -12,7 +12,6 @@
 # License for the specific language governing permissions and limitations under
 # the License.
 
-load("@rules_shell//shell:sh_test.bzl", "sh_test")
 load("@zephyr//:cc.bzl", "zephyr_app", "zephyr_cc_library")
 
 package(default_visibility = ["//visibility:public"])
diff --git a/examples/mock_modules_dir/mock_module/BUILD.bazel b/examples/mock_modules_dir/mock_module/BUILD.bazel
index d6af671..eae8b95 100644
--- a/examples/mock_modules_dir/mock_module/BUILD.bazel
+++ b/examples/mock_modules_dir/mock_module/BUILD.bazel
@@ -18,7 +18,7 @@
 
 zephyr_module(
     name = "mock_module",
-    config = "CONFIG_MOCK_MODULE",
     srcs = ["mock_module.cc"],
     hdrs = ["mock_module.h"],
+    config = "CONFIG_MOCK_MODULE",
 )
diff --git a/examples/tests/BUILD.bazel b/examples/tests/BUILD.bazel
index 53ae6d8..efc719b 100644
--- a/examples/tests/BUILD.bazel
+++ b/examples/tests/BUILD.bazel
@@ -23,11 +23,23 @@
 package(default_visibility = ["//visibility:public"])
 
 main_repo = get_zc_repo_name("//hello_bazel", "nrf52833dk")
-helper_key = "sysbuild_app:helper_app:native_sim"
-helper_repo = SYSBUILD_CUSTOM_REPOS.get(helper_key, get_zc_repo_name("//hello_bazel", "native_sim"))
 
-main_canonical = REPO_NAME_TO_CANONICAL.get(main_repo, "@" + main_repo)
-helper_canonical = REPO_NAME_TO_CANONICAL.get(helper_repo, "@" + helper_repo)
+helper_key = "sysbuild_app:helper_app:native_sim"
+
+helper_repo = SYSBUILD_CUSTOM_REPOS.get(
+    helper_key,
+    get_zc_repo_name("//hello_bazel", "native_sim"),
+)
+
+main_canonical = REPO_NAME_TO_CANONICAL.get(
+    main_repo,
+    "@" + main_repo,
+)
+
+helper_canonical = REPO_NAME_TO_CANONICAL.get(
+    helper_repo,
+    "@" + helper_repo,
+)
 
 platform_data(
     name = "hello_bazel_rp2040_elf",
diff --git a/examples/ztest_mock_fail/BUILD.bazel b/examples/ztest_mock_fail/BUILD.bazel
index b0da52f..32cb255 100644
--- a/examples/ztest_mock_fail/BUILD.bazel
+++ b/examples/ztest_mock_fail/BUILD.bazel
@@ -12,8 +12,8 @@
 # License for the specific language governing permissions and limitations under
 # the License.
 
-load("@zephyr-bazel//bazel_overlay:cc_test.bzl", "ztest")
 load("@zephyr//:cc.bzl", "zephyr_cc_library")
+load("@zephyr-bazel//bazel_overlay:cc_test.bzl", "ztest")
 
 package(default_visibility = ["//visibility:public"])
 
diff --git a/examples/ztest_mock_pass/BUILD.bazel b/examples/ztest_mock_pass/BUILD.bazel
index fb32754..9de3ed8 100644
--- a/examples/ztest_mock_pass/BUILD.bazel
+++ b/examples/ztest_mock_pass/BUILD.bazel
@@ -12,8 +12,8 @@
 # License for the specific language governing permissions and limitations under
 # the License.
 
-load("@zephyr-bazel//bazel_overlay:cc_test.bzl", "ztest")
 load("@zephyr//:cc.bzl", "zephyr_cc_library")
+load("@zephyr-bazel//bazel_overlay:cc_test.bzl", "ztest")
 
 package(default_visibility = ["//visibility:public"])
 
diff --git a/modules/hal_atmel.BUILD b/modules/hal_atmel.BUILD
index 07146ee..8e5b811 100644
--- a/modules/hal_atmel.BUILD
+++ b/modules/hal_atmel.BUILD
@@ -13,6 +13,7 @@
 # the License.
 
 load("@zephyr//:cc.bzl", "zephyr_module")
+load("@rules_cc//cc:cc_library.bzl", "cc_library")
 
 package(default_visibility = ["//visibility:public"])
 
diff --git a/modules/hal_nordic.BUILD b/modules/hal_nordic.BUILD
index 71d97a5..182eca4 100644
--- a/modules/hal_nordic.BUILD
+++ b/modules/hal_nordic.BUILD
@@ -31,17 +31,18 @@
     }),
     includes = [
         "nrfx",
-        "nrfx/drivers/include",
-        "nrfx/hal",
         "nrfx/bsp/stable",
         "nrfx/bsp/stable/mdk",
         "nrfx/bsp/stable/templates",
+        "nrfx/drivers/include",
+        "nrfx/hal",
     ],
 )
 
 filegroup(
     name = "nrfx_driver_srcs",
     srcs = [
+        "nrfx/bsp/stable/mdk/system_nrf52.c",
         "nrfx/drivers/src/nrfx_clock.c",
         "nrfx/drivers/src/nrfx_clock_hfclk.c",
         "nrfx/drivers/src/nrfx_clock_lfclk.c",
@@ -49,17 +50,16 @@
         "nrfx/helpers/nrfx_flag32_allocator.c",
         "nrfx/helpers/nrfx_gppi_dppi.c",
         "nrfx/helpers/nrfx_gppi_ppi.c",
-        "nrfx/bsp/stable/mdk/system_nrf52.c",
     ],
 )
 
 zephyr_module(
     name = "hal_nordic",
-    config = "CONFIG_HAS_NRFX",
     srcs = [
         ":nrfx_driver_srcs",
         "@zephyr//modules/hal_nordic/nrfx:nrfx_srcs",
     ],
+    config = "CONFIG_HAS_NRFX",
     deps = [
         ":dt_interface",
         "@zephyr//modules/hal_nordic/nrfx:nrfx_hdrs",
diff --git a/modules/hal_nxp.BUILD b/modules/hal_nxp.BUILD
index c050f39..d768075 100644
--- a/modules/hal_nxp.BUILD
+++ b/modules/hal_nxp.BUILD
@@ -547,8 +547,8 @@
             ":fsl_dma_srcs",
             ":fsl_flexcomm_srcs",
             ":fsl_gpio_srcs",
-            ":fsl_inputmux_srcs",
             ":fsl_i2c_srcs",
+            ":fsl_inputmux_srcs",
             ":fsl_ostimer_srcs",
             ":fsl_pint_srcs",
             ":fsl_spi_srcs",
@@ -558,6 +558,10 @@
         ],
         "//conditions:default": [],
     }),
+    defines = select({
+        "@zephyr_kconfig//:CONFIG_SOC_MIMXRT595S_CM33=true": ["CPU_MIMXRT595SFAWC_cm33"],
+        "//conditions:default": [],
+    }),
     deps = select({
         "@zephyr_kconfig//:CONFIG_SOC_SERIES_IMXRT5XX=true": [
             ":fsl_cache_hdrs",
@@ -566,10 +570,10 @@
             ":fsl_flexcomm_hdrs",
             ":fsl_flexspi_hdrs",
             ":fsl_gpio_hdrs",
+            ":fsl_i2c_hdrs",
             ":fsl_inputmux_hdrs",
             ":fsl_iopctl_hdrs",
             ":fsl_os_abstraction_hdrs",
-            ":fsl_i2c_hdrs",
             ":fsl_ostimer_hdrs",
             ":fsl_pint_hdrs",
             ":fsl_spi_hdrs",
@@ -581,10 +585,6 @@
         ],
         "//conditions:default": [],
     }),
-    defines = select({
-        "@zephyr_kconfig//:CONFIG_SOC_MIMXRT595S_CM33=true": ["CPU_MIMXRT595SFAWC_cm33"],
-        "//conditions:default": [],
-    }),
 )
 
 zephyr_module(
diff --git a/modules/hal_rpi_pico.BUILD b/modules/hal_rpi_pico.BUILD
index 9a7c6db..beecb48 100644
--- a/modules/hal_rpi_pico.BUILD
+++ b/modules/hal_rpi_pico.BUILD
@@ -24,8 +24,8 @@
 load("@hal_rpi_pico//:bazel/toolchain/objcopy.bzl", "objcopy_to_bin")
 load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
 load("@rules_python//python:py_binary.bzl", "py_binary")
-load("@zephyr-bazel//bazel_overlay/boards/raspberrypi/rpi_pico:boot2_transition.bzl", "boot2_binary")
 load("@zephyr//:cc.bzl", "zephyr_module")
+load("@zephyr-bazel//bazel_overlay/boards/raspberrypi/rpi_pico:boot2_transition.bzl", "boot2_binary")
 
 package(default_visibility = ["//visibility:public"])
 
diff --git a/modules/openair.BUILD b/modules/openair.BUILD
index f017b32..98a789d 100644
--- a/modules/openair.BUILD
+++ b/modules/openair.BUILD
@@ -13,7 +13,7 @@
 # the License.
 
 load("@rules_cc//cc:defs.bzl", "cc_library")
-load("@zephyr//:cc.bzl", "zephyr_cc_library", "zephyr_soc_library")
+load("@zephyr//:cc.bzl", "zephyr_cc_library", "zephyr_module", "zephyr_soc_library")
 load("@zephyr//:flags.bzl", "flags_from_dict")
 load("@zephyr-bazel//bazel:openair_helpers.bzl", "safe_glob", "select_drivers")
 
@@ -27,7 +27,6 @@
 
 cc_library(
     name = "atmosic_headers_common",
-    defines = ["ADC_GAIN_1_8=0x80"],
     hdrs = glob(
         [
             "include/**/*.h",
@@ -47,14 +46,14 @@
         ],
         allow_empty = True,
     ) + [
-        "@zephyr//drivers/gpio:gpio_cmsdk_ahb.c",
         "@zephyr//drivers/adc:adc_context.h",
+        "@zephyr//drivers/gpio:gpio_cmsdk_ahb.c",
         "@zephyr//drivers/i2c:i2c-priv.h",
         "@zephyr//drivers/spi:spi_context.h",
     ],
+    defines = ["ADC_GAIN_1_8=0x80"],
     includes = [
         "include",
-        "modules/hal_atmosic/include",
         "lib/app_batt",
         "lib/app_work_q",
         "lib/at_cmd",
@@ -81,16 +80,6 @@
         "lib/ranging_oob_de",
         "lib/sec_assert",
         "lib/sec_service",
-        "subsys/bluetooth/services/atm_bt_tput",
-        "subsys/bluetooth/services/atm_bt_tput/include",
-        "subsys/bluetooth/services/dult",
-        "subsys/bluetooth/services/gfp",
-        "subsys/bluetooth/services/gfp/dis",
-        "subsys/bluetooth/services/gfp/fmdn",
-        "subsys/bluetooth/services/ras",
-        "subsys/bluetooth/services/ras/include",
-        "subsys/settings",
-        "soc/atmosic/include",
         "modules/hal_atmosic/drivers/at_tz_mpc",
         "modules/hal_atmosic/drivers/at_tz_sau",
         "modules/hal_atmosic/drivers/atm_aes",
@@ -119,6 +108,17 @@
         "modules/hal_atmosic/drivers/sec_debug",
         "modules/hal_atmosic/drivers/sec_reset",
         "modules/hal_atmosic/drivers/sec_wdog_disable",
+        "modules/hal_atmosic/include",
+        "soc/atmosic/include",
+        "subsys/bluetooth/services/atm_bt_tput",
+        "subsys/bluetooth/services/atm_bt_tput/include",
+        "subsys/bluetooth/services/dult",
+        "subsys/bluetooth/services/gfp",
+        "subsys/bluetooth/services/gfp/dis",
+        "subsys/bluetooth/services/gfp/fmdn",
+        "subsys/bluetooth/services/ras",
+        "subsys/bluetooth/services/ras/include",
+        "subsys/settings",
     ],
 )
 
@@ -138,16 +138,6 @@
         allow_empty = True,
     ),
     includes = [
-        "modules/hal_atmosic/ATM34xx/include",
-        "modules/hal_atmosic/ATM34xx/rev-5/include",
-        "modules/hal_atmosic/ATM34xx/rev-5/include/arm",
-        "modules/hal_atmosic/ATM34xx/rev-5/include/armgcc",
-        "modules/hal_atmosic/ATM34xx/rev-5/include/reg",
-        "modules/hal_atmosic/ATM34xx/rev-5/lib/blell/controller/include/ble",
-        "modules/hal_atmosic/ATM34xx/rev-5/lib/blell/controller/include/common",
-        "modules/hal_atmosic/ATM34xx/rev-5/lib/blell/platform/include",
-        "modules/hal_atmosic/ATM34xx/rev-5/lib/blell/wsf/include",
-        "modules/hal_atmosic/ATM34xx/rev-5/lib/blell/wsf/include/util",
         "drivers/adc",
         "modules/hal_atmosic/ATM34xx/drivers/at_tz_ppc",
         "modules/hal_atmosic/ATM34xx/drivers/atm_otp",
@@ -158,6 +148,7 @@
         "modules/hal_atmosic/ATM34xx/drivers/key_sideload",
         "modules/hal_atmosic/ATM34xx/drivers/pinmux",
         "modules/hal_atmosic/ATM34xx/drivers/pmu",
+        "modules/hal_atmosic/ATM34xx/drivers/pseq",
         "modules/hal_atmosic/ATM34xx/drivers/radio_hal_154",
         "modules/hal_atmosic/ATM34xx/drivers/radio_req_154",
         "modules/hal_atmosic/ATM34xx/drivers/rep_vec",
@@ -171,8 +162,17 @@
         "modules/hal_atmosic/ATM34xx/drivers/sec_reset",
         "modules/hal_atmosic/ATM34xx/drivers/spi",
         "modules/hal_atmosic/ATM34xx/drivers/timer",
-        "modules/hal_atmosic/ATM34xx/drivers/pseq",
         "modules/hal_atmosic/ATM34xx/drivers/trng",
+        "modules/hal_atmosic/ATM34xx/include",
+        "modules/hal_atmosic/ATM34xx/rev-5/include",
+        "modules/hal_atmosic/ATM34xx/rev-5/include/arm",
+        "modules/hal_atmosic/ATM34xx/rev-5/include/armgcc",
+        "modules/hal_atmosic/ATM34xx/rev-5/include/reg",
+        "modules/hal_atmosic/ATM34xx/rev-5/lib/blell/controller/include/ble",
+        "modules/hal_atmosic/ATM34xx/rev-5/lib/blell/controller/include/common",
+        "modules/hal_atmosic/ATM34xx/rev-5/lib/blell/platform/include",
+        "modules/hal_atmosic/ATM34xx/rev-5/lib/blell/wsf/include",
+        "modules/hal_atmosic/ATM34xx/rev-5/lib/blell/wsf/include/util",
         "soc/atmosic/ATM34",
     ],
     deps = [":atmosic_headers_common"],
@@ -190,13 +190,6 @@
         allow_empty = True,
     ),
     includes = [
-        "modules/hal_atmosic/ATM33xx-5/include",
-        "modules/hal_atmosic/ATM33xx-5/include/arm",
-        "modules/hal_atmosic/ATM33xx-5/include/armgcc",
-        "modules/hal_atmosic/ATM33xx-5/include/ble",
-        "modules/hal_atmosic/ATM33xx-5/include/reg_ble",
-        "modules/hal_atmosic/ATM33xx-5/include/reg",
-        "modules/hal_atmosic/ATM33xx-5/drivers/reg",
         "modules/hal_atmosic/ATM33xx-5/drivers/at_tz_ppc",
         "modules/hal_atmosic/ATM33xx-5/drivers/atm_otp",
         "modules/hal_atmosic/ATM33xx-5/drivers/atm_vendor_drv",
@@ -206,6 +199,8 @@
         "modules/hal_atmosic/ATM33xx-5/drivers/key_sideload",
         "modules/hal_atmosic/ATM33xx-5/drivers/pinmux",
         "modules/hal_atmosic/ATM33xx-5/drivers/pmu",
+        "modules/hal_atmosic/ATM33xx-5/drivers/pseq",
+        "modules/hal_atmosic/ATM33xx-5/drivers/reg",
         "modules/hal_atmosic/ATM33xx-5/drivers/rep_vec",
         "modules/hal_atmosic/ATM33xx-5/drivers/rf",
         "modules/hal_atmosic/ATM33xx-5/drivers/sec_cache",
@@ -216,9 +211,14 @@
         "modules/hal_atmosic/ATM33xx-5/drivers/sec_reset",
         "modules/hal_atmosic/ATM33xx-5/drivers/spi",
         "modules/hal_atmosic/ATM33xx-5/drivers/timer",
-        "modules/hal_atmosic/ATM33xx-5/drivers/pseq",
         "modules/hal_atmosic/ATM33xx-5/drivers/trng",
         "modules/hal_atmosic/ATM33xx-5/drivers/workarounds",
+        "modules/hal_atmosic/ATM33xx-5/include",
+        "modules/hal_atmosic/ATM33xx-5/include/arm",
+        "modules/hal_atmosic/ATM33xx-5/include/armgcc",
+        "modules/hal_atmosic/ATM33xx-5/include/ble",
+        "modules/hal_atmosic/ATM33xx-5/include/reg",
+        "modules/hal_atmosic/ATM33xx-5/include/reg_ble",
         "soc/atmosic/ATM33",
     ],
     deps = [":atmosic_headers_common"],
@@ -258,7 +258,10 @@
     "CONFIG_FLASH": safe_glob(["drivers/flash/**/*.c"]),
     # gpio_atm.c is excluded because it has an incompatible include path. We use a genrule
     # to modify this file and include the modified one.
-    "CONFIG_GPIO": safe_glob(["drivers/gpio/**/*.c"], exclude = ["drivers/gpio/gpio_atm.c"]),
+    "CONFIG_GPIO": safe_glob(
+        ["drivers/gpio/**/*.c"],
+        exclude = ["drivers/gpio/gpio_atm.c"],
+    ),
     "CONFIG_I2C": safe_glob(["drivers/i2c/**/*.c"]),
     "CONFIG_I2S": safe_glob(["drivers/i2s/**/*.c"]),
     "CONFIG_IEEE802154": safe_glob(["drivers/ieee802154/**/*.c"]),
@@ -305,7 +308,10 @@
     "CONFIG_ATM_SEC_RESET": safe_glob(["modules/hal_atmosic/ATM34xx/drivers/sec_reset/**/*.c"]),
     "CONFIG_ATM_SEC_CACHE": safe_glob(["modules/hal_atmosic/ATM34xx/drivers/sec_cache/**/*.c"]),
     "CONFIG_ATM_SPI": safe_glob(["modules/hal_atmosic/ATM34xx/drivers/spi/**/*.c"]),
-    "CONFIG_PM": safe_glob(["modules/hal_atmosic/ATM34xx/src/power.c", "modules/hal_atmosic/ATM34xx/drivers/rep_vec/**/*.c"]),
+    "CONFIG_PM": safe_glob([
+        "modules/hal_atmosic/ATM34xx/src/power.c",
+        "modules/hal_atmosic/ATM34xx/drivers/rep_vec/**/*.c",
+    ]),
     "CONFIG_ATM_BROWNOUT": safe_glob(["modules/hal_atmosic/ATM34xx/drivers/brwnout/**/*.c"]),
 }
 
@@ -432,7 +438,10 @@
 
 zephyr_cc_library(
     name = "atmosic_drivers_atm34",
-    srcs = [":atmosic_driver_srcs_atm34", ":patch_gpio_atm"] + select_drivers(ATM34_DRIVERS_OBJS_MAP),
+    srcs = [
+        ":atmosic_driver_srcs_atm34",
+        ":patch_gpio_atm",
+    ] + select_drivers(ATM34_DRIVERS_OBJS_MAP),
     copts = [
         "-DATM_GPIO_CMSDK_AHB_PATH=\\\"drivers/gpio/gpio_cmsdk_ahb.c\\\"",
         "-isystem external/zephyr-bazel++zephyr_patch_file+zephyr",
@@ -450,7 +459,10 @@
 
 zephyr_cc_library(
     name = "atmosic_drivers_atm33",
-    srcs = [":atmosic_driver_srcs_atm33", ":patch_gpio_atm"] + select_drivers(ATM33_DRIVERS_OBJS_MAP),
+    srcs = [
+        ":atmosic_driver_srcs_atm33",
+        ":patch_gpio_atm",
+    ] + select_drivers(ATM33_DRIVERS_OBJS_MAP),
     copts = [
         "-DATM_GPIO_CMSDK_AHB_PATH=\\\"drivers/gpio/gpio_cmsdk_ahb.c\\\"",
         "-isystem external/zephyr-bazel++zephyr_patch_file+zephyr",
@@ -497,21 +509,71 @@
 )
 
 # ATM34 Boards
-platform(name = "ATMEVK-3405-YBV-5/ATM34xx-5", parents = [":ATM34xx-5"])
-platform(name = "ATMEVK-3405-PQK-5/ATM34xx-5", parents = [":ATM34xx-5"])
-platform(name = "ATMEVK-3430e-YQN-5/ATM34xx-5", parents = [":ATM34xx-5"])
-platform(name = "ATMBTCSTAG-3405/ATM34xx-5", parents = [":ATM34xx-5"])
-platform(name = "ATMMOD-3405/ATM34xx-5", parents = [":ATM34xx-5"])
-platform(name = "ATMEVK-3405-WQK-5/ATM34xx-5", parents = [":ATM34xx-5"])
-platform(name = "ATMEVK-3405-PBV-5/ATM34xx-5", parents = [":ATM34xx-5"])
+platform(
+    name = "ATMEVK-3405-YBV-5/ATM34xx-5",
+    parents = [":ATM34xx-5"],
+)
+
+platform(
+    name = "ATMEVK-3405-PQK-5/ATM34xx-5",
+    parents = [":ATM34xx-5"],
+)
+
+platform(
+    name = "ATMEVK-3430e-YQN-5/ATM34xx-5",
+    parents = [":ATM34xx-5"],
+)
+
+platform(
+    name = "ATMBTCSTAG-3405/ATM34xx-5",
+    parents = [":ATM34xx-5"],
+)
+
+platform(
+    name = "ATMMOD-3405/ATM34xx-5",
+    parents = [":ATM34xx-5"],
+)
+
+platform(
+    name = "ATMEVK-3405-WQK-5/ATM34xx-5",
+    parents = [":ATM34xx-5"],
+)
+
+platform(
+    name = "ATMEVK-3405-PBV-5/ATM34xx-5",
+    parents = [":ATM34xx-5"],
+)
 
 # ATM33 Boards
-platform(name = "ATMEVK-3330-QN-6/ATM33xx-5", parents = [":ATM33xx-5"])
-platform(name = "ATMEVK-3330e-QN-6/ATM33xx-5", parents = [":ATM33xx-5"])
-platform(name = "ATMEVK-3330e-QN-7/ATM33xx-5", parents = [":ATM33xx-5"])
-platform(name = "ATMEVK-3325-CM-6/ATM33xx-5", parents = [":ATM33xx-5"])
-platform(name = "ATMEVK-3325-QK-6/ATM33xx-5", parents = [":ATM33xx-5"])
-platform(name = "ATMEVK-3325-LQK-6/ATM33xx-5", parents = [":ATM33xx-5"])
+platform(
+    name = "ATMEVK-3330-QN-6/ATM33xx-5",
+    parents = [":ATM33xx-5"],
+)
+
+platform(
+    name = "ATMEVK-3330e-QN-6/ATM33xx-5",
+    parents = [":ATM33xx-5"],
+)
+
+platform(
+    name = "ATMEVK-3330e-QN-7/ATM33xx-5",
+    parents = [":ATM33xx-5"],
+)
+
+platform(
+    name = "ATMEVK-3325-CM-6/ATM33xx-5",
+    parents = [":ATM33xx-5"],
+)
+
+platform(
+    name = "ATMEVK-3325-QK-6/ATM33xx-5",
+    parents = [":ATM33xx-5"],
+)
+
+platform(
+    name = "ATMEVK-3325-LQK-6/ATM33xx-5",
+    parents = [":ATM33xx-5"],
+)
 
 cc_library(
     name = "openair_deps",
@@ -522,12 +584,9 @@
     }) + [":atmosic_headers_common"],
 )
 
-load("@zephyr//:cc.bzl", "zephyr_module")
-
 # Wrapper target for auto-linking the module to kernel dependencies
 zephyr_module(
     name = "openair",
     config = "CONFIG_SOC_FAMILY_ATM",
     deps = [":openair_deps"],
 )
-
diff --git a/naming.bzl b/naming.bzl
index ccd355a..7bb0916 100644
--- a/naming.bzl
+++ b/naming.bzl
@@ -142,6 +142,7 @@
             package: The package path (e.g., 'modules/foo' or '').
             name: The target name (e.g., 'my_module' or '').
     """
+
     # Purely manual string parsing for all string inputs to avoid repo mapping issues in tests
     canonical_repo = ""
     apparent_repo = ""
@@ -285,4 +286,3 @@
                         resolved_modules.append(path_str)
 
     return resolved_modules
-
diff --git a/scripts/build/BUILD.bazel b/scripts/build/BUILD.bazel
index 9985cdb..0f34932 100644
--- a/scripts/build/BUILD.bazel
+++ b/scripts/build/BUILD.bazel
@@ -138,8 +138,8 @@
     imports = ["."],
     deps = [
         ":zephyr_flash_utils",
-        "@zephyr_bazel_pip_deps//pyserial",
         "@zephyr_bazel_pip_deps//pylink_square",
+        "@zephyr_bazel_pip_deps//pyserial",
         "@zephyr_bazel_pip_deps//pyyaml",
     ],
 )
@@ -155,8 +155,8 @@
     name = "ztest_runner",
     srcs = ["ztest_runner.py"],
     deps = [
-        ":ztest_runner_core",
         ":zephyr_flash_utils",
+        ":ztest_runner_core",
         "@rules_python//python/runfiles",
     ],
 )
@@ -178,13 +178,12 @@
     ],
     deps = [
         "@rules_python//python/runfiles",
+        "@zephyr_bazel_pip_deps//pylink_square",
         "@zephyr_bazel_pip_deps//pyserial",
         "@zephyr_bazel_pip_deps//pyyaml",
-        "@zephyr_bazel_pip_deps//pylink_square",
     ],
 )
 
-
 py_test(
     name = "zephyr_flash_utils_test",
     srcs = ["zephyr_flash_utils_test.py"],
@@ -197,14 +196,14 @@
 py_binary(
     name = "zephyr_flash_utils_bin",
     srcs = ["zephyr_flash_utils.py"],
-    main = "zephyr_flash_utils.py",
     data = [
         "@zephyr//scripts:west_runners_scripts",
     ],
+    main = "zephyr_flash_utils.py",
     deps = [
         "@rules_python//python/runfiles",
+        "@zephyr_bazel_pip_deps//pylink_square",
         "@zephyr_bazel_pip_deps//pyserial",
         "@zephyr_bazel_pip_deps//pyyaml",
-        "@zephyr_bazel_pip_deps//pylink_square",
     ],
 )
diff --git a/setup.bzl b/setup.bzl
index 0db1944..c6441f1 100644
--- a/setup.bzl
+++ b/setup.bzl
@@ -442,6 +442,7 @@
         # 2. External repositories with a local overlay in modules/ using the zephyr_module macro are Auto-Linked.
         # 3. Otherwise, the module is Scan-Only (Kconfig/DTS only).
         lbl_info = parse_label(dir_label_str)
+
         # Check if the repository is external (canonical name is not "@@")
         is_external = lbl_info.canonical_repo and lbl_info.canonical_repo != "@@"
 
@@ -577,11 +578,23 @@
         dir_path = get_dir_from_label(mctx, l)
         dir_path.readdir(watch = "yes")
         res = mctx.execute([
-            "find", str(dir_path),
-            "-name", "out", "-prune", "-o",
-            "-name", "bazel-*", "-prune", "-o",
-            "-name", ".*", "-prune", "-o",
-            "-name", "prj.conf", "-print"
+            "find",
+            str(dir_path),
+            "-name",
+            "out",
+            "-prune",
+            "-o",
+            "-name",
+            "bazel-*",
+            "-prune",
+            "-o",
+            "-name",
+            ".*",
+            "-prune",
+            "-o",
+            "-name",
+            "prj.conf",
+            "-print",
         ])
         if res.return_code == 0:
             for line in res.stdout.splitlines():
@@ -633,7 +646,6 @@
     test_metadata_content = mctx.read(test_metadata_file)
     yaml_metadata = json.decode(test_metadata_content)
 
-
     sysbuild_metadata_file = "sysbuild_metadata.json"
     sysbuild_script_path = mctx.path(Label("@zephyr-bazel//scripts/build:parse_sysbuild_metadata.py"))
     sysbuild_res = python.execute([
@@ -660,10 +672,6 @@
                     resolved_conf_fragments.append(fragment)
             repo["conf_fragments"] = resolved_conf_fragments
 
-
-
-
-
     surviving_combinations = {}
     for app_pkg, app_path in discovered_apps.items():
         surviving_combinations[app_pkg] = []
diff --git a/toolchain/arc/BUILD.bazel b/toolchain/arc/BUILD.bazel
index a2b5096..7c58cf8 100644
--- a/toolchain/arc/BUILD.bazel
+++ b/toolchain/arc/BUILD.bazel
@@ -44,9 +44,9 @@
     ],
     args = [
         "-isystem",
-        _ZEPHYR_SDK_ARC_TOOLCHAIN_ROOT + "/lib/gcc/arc-zephyr-elf/14.3.0/include", # PLACEHOLDER
+        _ZEPHYR_SDK_ARC_TOOLCHAIN_ROOT + "/lib/gcc/arc-zephyr-elf/14.3.0/include",  # PLACEHOLDER
         "-isystem",
-        _ZEPHYR_SDK_ARC_TOOLCHAIN_ROOT + "/lib/gcc/arc-zephyr-elf/14.3.0/include-fixed", # PLACEHOLDER
+        _ZEPHYR_SDK_ARC_TOOLCHAIN_ROOT + "/lib/gcc/arc-zephyr-elf/14.3.0/include-fixed",  # PLACEHOLDER
     ],
 )
 
diff --git a/toolchain/arc/zephyr_sdk_arc.BUILD b/toolchain/arc/zephyr_sdk_arc.BUILD
index 8eeca29..3b037b6 100644
--- a/toolchain/arc/zephyr_sdk_arc.BUILD
+++ b/toolchain/arc/zephyr_sdk_arc.BUILD
@@ -66,7 +66,6 @@
     name = "arc-gcc",
     src = "//:bin/arc-zephyr-elf-gcc",
     data = glob([
-
         "lib/gcc/arc-zephyr-elf/14.3.0/include/**",
         "lib/gcc/arc-zephyr-elf/14.3.0/include-fixed/**",
         "libexec/gcc/arc-zephyr-elf/14.3.0/**",
diff --git a/toolchain/args/BUILD.bazel b/toolchain/args/BUILD.bazel
index 90137fd..d49f1e9 100644
--- a/toolchain/args/BUILD.bazel
+++ b/toolchain/args/BUILD.bazel
@@ -13,9 +13,7 @@
 # the License.
 
 load("@rules_cc//cc/toolchains:args.bzl", "cc_args")
-load("@rules_cc//cc/toolchains:args_list.bzl", "cc_args_list")
 load("@rules_cc//cc/toolchains:feature.bzl", "cc_feature")
-load("@rules_cc//cc/toolchains:feature_constraint.bzl", "cc_feature_constraint")
 
 package(default_visibility = ["//visibility:public"])
 
@@ -134,6 +132,6 @@
 
 cc_feature(
     name = "newlib_cdefs_workaround_feature",
-    feature_name = "newlib_cdefs_workaround",
     args = [":newlib_cdefs_workaround"],
+    feature_name = "newlib_cdefs_workaround",
 )
diff --git a/toolchain/arm64/BUILD.bazel b/toolchain/arm64/BUILD.bazel
index a9b251f..749e80b 100644
--- a/toolchain/arm64/BUILD.bazel
+++ b/toolchain/arm64/BUILD.bazel
@@ -44,9 +44,9 @@
     ],
     args = [
         "-isystem",
-        _ZEPHYR_SDK_ARM64_TOOLCHAIN_ROOT + "/lib/gcc/aarch64-zephyr-elf/14.3.0/include", # PLACEHOLDER
+        _ZEPHYR_SDK_ARM64_TOOLCHAIN_ROOT + "/lib/gcc/aarch64-zephyr-elf/14.3.0/include",  # PLACEHOLDER
         "-isystem",
-        _ZEPHYR_SDK_ARM64_TOOLCHAIN_ROOT + "/lib/gcc/aarch64-zephyr-elf/14.3.0/include-fixed", # PLACEHOLDER
+        _ZEPHYR_SDK_ARM64_TOOLCHAIN_ROOT + "/lib/gcc/aarch64-zephyr-elf/14.3.0/include-fixed",  # PLACEHOLDER
     ],
 )
 
diff --git a/toolchain/arm64/zephyr_sdk_arm64.BUILD b/toolchain/arm64/zephyr_sdk_arm64.BUILD
index 0283a0d..8e3725b 100644
--- a/toolchain/arm64/zephyr_sdk_arm64.BUILD
+++ b/toolchain/arm64/zephyr_sdk_arm64.BUILD
@@ -66,7 +66,6 @@
     name = "aarch64-gcc",
     src = "//:bin/aarch64-zephyr-elf-gcc",
     data = glob([
-
         "lib/gcc/aarch64-zephyr-elf/14.3.0/include/**",
         "lib/gcc/aarch64-zephyr-elf/14.3.0/include-fixed/**",
         "libexec/gcc/aarch64-zephyr-elf/14.3.0/**",
diff --git a/toolchain/mips/BUILD.bazel b/toolchain/mips/BUILD.bazel
index 9ab2deb..bdc146f 100644
--- a/toolchain/mips/BUILD.bazel
+++ b/toolchain/mips/BUILD.bazel
@@ -44,9 +44,9 @@
     ],
     args = [
         "-isystem",
-        _ZEPHYR_SDK_MIPS_TOOLCHAIN_ROOT + "/lib/gcc/mips-zephyr-elf/14.3.0/include", # PLACEHOLDER
+        _ZEPHYR_SDK_MIPS_TOOLCHAIN_ROOT + "/lib/gcc/mips-zephyr-elf/14.3.0/include",  # PLACEHOLDER
         "-isystem",
-        _ZEPHYR_SDK_MIPS_TOOLCHAIN_ROOT + "/lib/gcc/mips-zephyr-elf/14.3.0/include-fixed", # PLACEHOLDER
+        _ZEPHYR_SDK_MIPS_TOOLCHAIN_ROOT + "/lib/gcc/mips-zephyr-elf/14.3.0/include-fixed",  # PLACEHOLDER
     ],
 )
 
diff --git a/toolchain/riscv/BUILD.bazel b/toolchain/riscv/BUILD.bazel
index 212d8c8..3888d65 100644
--- a/toolchain/riscv/BUILD.bazel
+++ b/toolchain/riscv/BUILD.bazel
@@ -44,9 +44,9 @@
     ],
     args = [
         "-isystem",
-        _ZEPHYR_SDK_RISCV_TOOLCHAIN_ROOT + "/lib/gcc/riscv64-zephyr-elf/14.3.0/include", # PLACEHOLDER
+        _ZEPHYR_SDK_RISCV_TOOLCHAIN_ROOT + "/lib/gcc/riscv64-zephyr-elf/14.3.0/include",  # PLACEHOLDER
         "-isystem",
-        _ZEPHYR_SDK_RISCV_TOOLCHAIN_ROOT + "/lib/gcc/riscv64-zephyr-elf/14.3.0/include-fixed", # PLACEHOLDER
+        _ZEPHYR_SDK_RISCV_TOOLCHAIN_ROOT + "/lib/gcc/riscv64-zephyr-elf/14.3.0/include-fixed",  # PLACEHOLDER
     ],
 )
 
diff --git a/toolchain/riscv/zephyr_sdk_riscv.BUILD b/toolchain/riscv/zephyr_sdk_riscv.BUILD
index 3d2a35f..159b2f1 100644
--- a/toolchain/riscv/zephyr_sdk_riscv.BUILD
+++ b/toolchain/riscv/zephyr_sdk_riscv.BUILD
@@ -66,7 +66,6 @@
     name = "riscv-gcc",
     src = "//:bin/riscv64-zephyr-elf-gcc",
     data = glob([
-
         "lib/gcc/riscv64-zephyr-elf/14.3.0/include/**",
         "lib/gcc/riscv64-zephyr-elf/14.3.0/include-fixed/**",
         "libexec/gcc/riscv64-zephyr-elf/14.3.0/**",
diff --git a/toolchain/rx/BUILD.bazel b/toolchain/rx/BUILD.bazel
index d997df6..30f675b 100644
--- a/toolchain/rx/BUILD.bazel
+++ b/toolchain/rx/BUILD.bazel
@@ -44,9 +44,9 @@
     ],
     args = [
         "-isystem",
-        _ZEPHYR_SDK_RX_TOOLCHAIN_ROOT + "/lib/gcc/rx-zephyr-elf/14.3.0/include", # PLACEHOLDER
+        _ZEPHYR_SDK_RX_TOOLCHAIN_ROOT + "/lib/gcc/rx-zephyr-elf/14.3.0/include",  # PLACEHOLDER
         "-isystem",
-        _ZEPHYR_SDK_RX_TOOLCHAIN_ROOT + "/lib/gcc/rx-zephyr-elf/14.3.0/include-fixed", # PLACEHOLDER
+        _ZEPHYR_SDK_RX_TOOLCHAIN_ROOT + "/lib/gcc/rx-zephyr-elf/14.3.0/include-fixed",  # PLACEHOLDER
     ],
 )
 
diff --git a/toolchain/rx/zephyr_sdk_rx.BUILD b/toolchain/rx/zephyr_sdk_rx.BUILD
index 8850926..afb6ad2 100644
--- a/toolchain/rx/zephyr_sdk_rx.BUILD
+++ b/toolchain/rx/zephyr_sdk_rx.BUILD
@@ -66,7 +66,6 @@
     name = "rx-gcc",
     src = "//:bin/rx-zephyr-elf-gcc",
     data = glob([
-
         "lib/gcc/rx-zephyr-elf/14.3.0/include/**",
         "lib/gcc/rx-zephyr-elf/14.3.0/include-fixed/**",
         "libexec/gcc/rx-zephyr-elf/14.3.0/**",
diff --git a/toolchain/sparc/BUILD.bazel b/toolchain/sparc/BUILD.bazel
index cf870d7..3917783 100644
--- a/toolchain/sparc/BUILD.bazel
+++ b/toolchain/sparc/BUILD.bazel
@@ -44,9 +44,9 @@
     ],
     args = [
         "-isystem",
-        _ZEPHYR_SDK_SPARC_TOOLCHAIN_ROOT + "/lib/gcc/sparc-zephyr-elf/14.3.0/include", # PLACEHOLDER
+        _ZEPHYR_SDK_SPARC_TOOLCHAIN_ROOT + "/lib/gcc/sparc-zephyr-elf/14.3.0/include",  # PLACEHOLDER
         "-isystem",
-        _ZEPHYR_SDK_SPARC_TOOLCHAIN_ROOT + "/lib/gcc/sparc-zephyr-elf/14.3.0/include-fixed", # PLACEHOLDER
+        _ZEPHYR_SDK_SPARC_TOOLCHAIN_ROOT + "/lib/gcc/sparc-zephyr-elf/14.3.0/include-fixed",  # PLACEHOLDER
     ],
 )
 
diff --git a/toolchain/sparc/zephyr_sdk_sparc.BUILD b/toolchain/sparc/zephyr_sdk_sparc.BUILD
index 692256a..fd47940 100644
--- a/toolchain/sparc/zephyr_sdk_sparc.BUILD
+++ b/toolchain/sparc/zephyr_sdk_sparc.BUILD
@@ -66,7 +66,6 @@
     name = "sparc-gcc",
     src = "//:bin/sparc-zephyr-elf-gcc",
     data = glob([
-
         "lib/gcc/sparc-zephyr-elf/14.3.0/include/**",
         "lib/gcc/sparc-zephyr-elf/14.3.0/include-fixed/**",
         "libexec/gcc/sparc-zephyr-elf/14.3.0/**",
diff --git a/toolchain/x86/BUILD.bazel b/toolchain/x86/BUILD.bazel
index aaf30ee..459bac3 100644
--- a/toolchain/x86/BUILD.bazel
+++ b/toolchain/x86/BUILD.bazel
@@ -44,9 +44,9 @@
     ],
     args = [
         "-isystem",
-        _ZEPHYR_SDK_X86_TOOLCHAIN_ROOT + "/lib/gcc/x86_64-zephyr-elf/14.3.0/include", # PLACEHOLDER
+        _ZEPHYR_SDK_X86_TOOLCHAIN_ROOT + "/lib/gcc/x86_64-zephyr-elf/14.3.0/include",  # PLACEHOLDER
         "-isystem",
-        _ZEPHYR_SDK_X86_TOOLCHAIN_ROOT + "/lib/gcc/x86_64-zephyr-elf/14.3.0/include-fixed", # PLACEHOLDER
+        _ZEPHYR_SDK_X86_TOOLCHAIN_ROOT + "/lib/gcc/x86_64-zephyr-elf/14.3.0/include-fixed",  # PLACEHOLDER
     ],
 )
 
diff --git a/toolchain/x86/zephyr_sdk_x86.BUILD b/toolchain/x86/zephyr_sdk_x86.BUILD
index c125624..bce0f42 100644
--- a/toolchain/x86/zephyr_sdk_x86.BUILD
+++ b/toolchain/x86/zephyr_sdk_x86.BUILD
@@ -66,7 +66,6 @@
     name = "x86-gcc",
     src = "//:bin/x86_64-zephyr-elf-gcc",
     data = glob([
-
         "lib/gcc/x86_64-zephyr-elf/14.3.0/include/**",
         "lib/gcc/x86_64-zephyr-elf/14.3.0/include-fixed/**",
         "libexec/gcc/x86_64-zephyr-elf/14.3.0/**",
diff --git a/toolchain/xtensa/zephyr_sdk_xtensa_dc233c.BUILD b/toolchain/xtensa/zephyr_sdk_xtensa_dc233c.BUILD
index ade2169..554c374 100644
--- a/toolchain/xtensa/zephyr_sdk_xtensa_dc233c.BUILD
+++ b/toolchain/xtensa/zephyr_sdk_xtensa_dc233c.BUILD
@@ -57,7 +57,6 @@
     name = "xt-g++",
     src = "//:bin/xtensa-dc233c_zephyr-elf-g++",
     data = glob([
-
         "lib/gcc/xtensa-dc233c_zephyr-elf/14.3.0/include/**",
         "lib/gcc/xtensa-dc233c_zephyr-elf/14.3.0/include-fixed/**",
         "libexec/gcc/xtensa-dc233c_zephyr-elf/14.3.0/**",
@@ -69,7 +68,6 @@
     name = "xt-gcc",
     src = "//:bin/xtensa-dc233c_zephyr-elf-gcc",
     data = glob([
-
         "lib/gcc/xtensa-dc233c_zephyr-elf/14.3.0/include/**",
         "lib/gcc/xtensa-dc233c_zephyr-elf/14.3.0/include-fixed/**",
         "libexec/gcc/xtensa-dc233c_zephyr-elf/14.3.0/**",
@@ -91,4 +89,3 @@
     name = "xt-strip",
     src = "//:bin/xtensa-dc233c_zephyr-elf-strip",
 )
-