From 2ac3b83c9383dfe77201e35f7c07cf932b67f2bb Mon Sep 17 00:00:00 2001 From: UebelAndre Date: Thu, 1 Apr 2021 18:45:36 -0700 Subject: [PATCH] Addressed buildifier defects (#599) --- examples/third_party/BUILD.bazel | 1 - foreign_cc/private/detect_root.bzl | 1 + .../toolchains/impl/default_commands.bzl | 4 +- .../toolchains/impl/linux_commands.bzl | 4 +- .../toolchains/impl/windows_commands.bzl | 4 +- toolchains/prebuilt_toolchains.bzl | 138 +++++++++--------- 6 files changed, 76 insertions(+), 76 deletions(-) diff --git a/examples/third_party/BUILD.bazel b/examples/third_party/BUILD.bazel index 7fe28669..c16dbc97 100644 --- a/examples/third_party/BUILD.bazel +++ b/examples/third_party/BUILD.bazel @@ -34,7 +34,6 @@ test_suite( ], ) - test_suite( name = "macos_tests", tags = ["manual"], diff --git a/foreign_cc/private/detect_root.bzl b/foreign_cc/private/detect_root.bzl index 592261d5..ed836ba0 100644 --- a/foreign_cc/private/detect_root.bzl +++ b/foreign_cc/private/detect_root.bzl @@ -40,5 +40,6 @@ def filter_containing_dirs_from_inputs(input_files_list): # Find all the directories that have at least one file or dir inside them. populated_dirs = {f.dirname: None for f in input_files_list} + # Filter out any files which are members of populated_dirs. return [f for f in input_files_list if f.path not in populated_dirs] diff --git a/foreign_cc/private/shell_toolchain/toolchains/impl/default_commands.bzl b/foreign_cc/private/shell_toolchain/toolchains/impl/default_commands.bzl index 9595c1ab..a6192605 100644 --- a/foreign_cc/private/shell_toolchain/toolchains/impl/default_commands.bzl +++ b/foreign_cc/private/shell_toolchain/toolchains/impl/default_commands.bzl @@ -62,8 +62,8 @@ fi def copy_dir_contents_to_dir(source, target): return """cp -L -r --no-target-directory "{source}" "{target}" && find {target} -type f -exec touch -r "{source}" "{{}}" \\;""".format( - source=source, - target=target, + source = source, + target = target, ) def symlink_contents_to_dir(source, target): diff --git a/foreign_cc/private/shell_toolchain/toolchains/impl/linux_commands.bzl b/foreign_cc/private/shell_toolchain/toolchains/impl/linux_commands.bzl index 68fa096e..59fc2fc4 100644 --- a/foreign_cc/private/shell_toolchain/toolchains/impl/linux_commands.bzl +++ b/foreign_cc/private/shell_toolchain/toolchains/impl/linux_commands.bzl @@ -62,8 +62,8 @@ fi def copy_dir_contents_to_dir(source, target): return """cp -L -r --no-target-directory "{source}" "{target}" && find {target} -type f -exec touch -r "{source}" "{{}}" \\;""".format( - source=source, - target=target, + source = source, + target = target, ) def symlink_contents_to_dir(source, target): diff --git a/foreign_cc/private/shell_toolchain/toolchains/impl/windows_commands.bzl b/foreign_cc/private/shell_toolchain/toolchains/impl/windows_commands.bzl index e5610ad5..6eb245a6 100644 --- a/foreign_cc/private/shell_toolchain/toolchains/impl/windows_commands.bzl +++ b/foreign_cc/private/shell_toolchain/toolchains/impl/windows_commands.bzl @@ -62,8 +62,8 @@ fi def copy_dir_contents_to_dir(source, target): return """cp -L -r --no-target-directory "{source}" "{target}" && find {target} -type f -exec touch -r "{source}" "{{}}" \\;""".format( - source=source, - target=target, + source = source, + target = target, ) def symlink_contents_to_dir(source, target): diff --git a/toolchains/prebuilt_toolchains.bzl b/toolchains/prebuilt_toolchains.bzl index 498e92b8..050bf2f9 100644 --- a/toolchains/prebuilt_toolchains.bzl +++ b/toolchains/prebuilt_toolchains.bzl @@ -138,23 +138,23 @@ def _cmake_toolchains(version): repos = { "cmake-3.20.0-linux-aarch64": [ "@platforms//cpu:aarch64", - "@platforms//os:linux" + "@platforms//os:linux", ], "cmake-3.20.0-linux-x86_64": [ "@platforms//cpu:x86_64", - "@platforms//os:linux" + "@platforms//os:linux", ], "cmake-3.20.0-macos-universal": [ - "@platforms//os:macos" + "@platforms//os:macos", ], "cmake-3.20.0-windows-i386": [ "@platforms//cpu:x86_32", - "@platforms//os:windows" + "@platforms//os:windows", ], "cmake-3.20.0-windows-x86_64": [ "@platforms//cpu:x86_64", - "@platforms//os:windows" - ] + "@platforms//os:windows", + ], }, tool = "cmake", ) @@ -242,23 +242,23 @@ def _cmake_toolchains(version): repos = { "cmake-3.19.7-Linux-aarch64": [ "@platforms//cpu:aarch64", - "@platforms//os:linux" + "@platforms//os:linux", ], "cmake-3.19.7-Linux-x86_64": [ "@platforms//cpu:x86_64", - "@platforms//os:linux" + "@platforms//os:linux", ], "cmake-3.19.7-macos-universal": [ - "@platforms//os:macos" + "@platforms//os:macos", ], "cmake-3.19.7-win32-x86": [ "@platforms//cpu:x86_32", - "@platforms//os:windows" + "@platforms//os:windows", ], "cmake-3.19.7-win64-x64": [ "@platforms//cpu:x86_64", - "@platforms//os:windows" - ] + "@platforms//os:windows", + ], }, tool = "cmake", ) @@ -346,23 +346,23 @@ def _cmake_toolchains(version): repos = { "cmake-3.19.6-Linux-aarch64": [ "@platforms//cpu:aarch64", - "@platforms//os:linux" + "@platforms//os:linux", ], "cmake-3.19.6-Linux-x86_64": [ "@platforms//cpu:x86_64", - "@platforms//os:linux" + "@platforms//os:linux", ], "cmake-3.19.6-macos-universal": [ - "@platforms//os:macos" + "@platforms//os:macos", ], "cmake-3.19.6-win32-x86": [ "@platforms//cpu:x86_32", - "@platforms//os:windows" + "@platforms//os:windows", ], "cmake-3.19.6-win64-x64": [ "@platforms//cpu:x86_64", - "@platforms//os:windows" - ] + "@platforms//os:windows", + ], }, tool = "cmake", ) @@ -450,23 +450,23 @@ def _cmake_toolchains(version): repos = { "cmake-3.19.5-Linux-aarch64": [ "@platforms//cpu:aarch64", - "@platforms//os:linux" + "@platforms//os:linux", ], "cmake-3.19.5-Linux-x86_64": [ "@platforms//cpu:x86_64", - "@platforms//os:linux" + "@platforms//os:linux", ], "cmake-3.19.5-macos-universal": [ - "@platforms//os:macos" + "@platforms//os:macos", ], "cmake-3.19.5-win32-x86": [ "@platforms//cpu:x86_32", - "@platforms//os:windows" + "@platforms//os:windows", ], "cmake-3.19.5-win64-x64": [ "@platforms//cpu:x86_64", - "@platforms//os:windows" - ] + "@platforms//os:windows", + ], }, tool = "cmake", ) @@ -541,20 +541,20 @@ def _cmake_toolchains(version): repos = { "cmake-3.18.6-Darwin-x86_64": [ "@platforms//cpu:x86_64", - "@platforms//os:macos" + "@platforms//os:macos", ], "cmake-3.18.6-Linux-x86_64": [ "@platforms//cpu:x86_64", - "@platforms//os:linux" + "@platforms//os:linux", ], "cmake-3.18.6-win32-x86": [ "@platforms//cpu:x86_32", - "@platforms//os:windows" + "@platforms//os:windows", ], "cmake-3.18.6-win64-x64": [ "@platforms//cpu:x86_64", - "@platforms//os:windows" - ] + "@platforms//os:windows", + ], }, tool = "cmake", ) @@ -628,20 +628,20 @@ def _cmake_toolchains(version): repos = { "cmake-3.17.5-Darwin-x86_64": [ "@platforms//cpu:x86_64", - "@platforms//os:macos" + "@platforms//os:macos", ], "cmake-3.17.5-Linux-x86_64": [ "@platforms//cpu:x86_64", - "@platforms//os:linux" + "@platforms//os:linux", ], "cmake-3.17.5-win32-x86": [ "@platforms//cpu:x86_32", - "@platforms//os:windows" + "@platforms//os:windows", ], "cmake-3.17.5-win64-x64": [ "@platforms//cpu:x86_64", - "@platforms//os:windows" - ] + "@platforms//os:windows", + ], }, tool = "cmake", ) @@ -715,20 +715,20 @@ def _cmake_toolchains(version): repos = { "cmake-3.16.9-Darwin-x86_64": [ "@platforms//cpu:x86_64", - "@platforms//os:macos" + "@platforms//os:macos", ], "cmake-3.16.9-Linux-x86_64": [ "@platforms//cpu:x86_64", - "@platforms//os:linux" + "@platforms//os:linux", ], "cmake-3.16.9-win32-x86": [ "@platforms//cpu:x86_32", - "@platforms//os:windows" + "@platforms//os:windows", ], "cmake-3.16.9-win64-x64": [ "@platforms//cpu:x86_64", - "@platforms//os:windows" - ] + "@platforms//os:windows", + ], }, tool = "cmake", ) @@ -802,20 +802,20 @@ def _cmake_toolchains(version): repos = { "cmake-3.15.7-Darwin-x86_64": [ "@platforms//cpu:x86_64", - "@platforms//os:macos" + "@platforms//os:macos", ], "cmake-3.15.7-Linux-x86_64": [ "@platforms//cpu:x86_64", - "@platforms//os:linux" + "@platforms//os:linux", ], "cmake-3.15.7-win32-x86": [ "@platforms//cpu:x86_32", - "@platforms//os:windows" + "@platforms//os:windows", ], "cmake-3.15.7-win64-x64": [ "@platforms//cpu:x86_64", - "@platforms//os:windows" - ] + "@platforms//os:windows", + ], }, tool = "cmake", ) @@ -889,20 +889,20 @@ def _cmake_toolchains(version): repos = { "cmake-3.14.7-Darwin-x86_64": [ "@platforms//cpu:x86_64", - "@platforms//os:macos" + "@platforms//os:macos", ], "cmake-3.14.7-Linux-x86_64": [ "@platforms//cpu:x86_64", - "@platforms//os:linux" + "@platforms//os:linux", ], "cmake-3.14.7-win32-x86": [ "@platforms//cpu:x86_32", - "@platforms//os:windows" + "@platforms//os:windows", ], "cmake-3.14.7-win64-x64": [ "@platforms//cpu:x86_64", - "@platforms//os:windows" - ] + "@platforms//os:windows", + ], }, tool = "cmake", ) @@ -966,16 +966,16 @@ def _ninja_toolchains(version): repos = { "ninja_1.10.2_linux": [ "@platforms//cpu:x86_64", - "@platforms//os:linux" + "@platforms//os:linux", ], "ninja_1.10.2_mac": [ "@platforms//cpu:x86_64", - "@platforms//os:macos" + "@platforms//os:macos", ], "ninja_1.10.2_win": [ "@platforms//cpu:x86_64", - "@platforms//os:windows" - ] + "@platforms//os:windows", + ], }, tool = "ninja", ) @@ -1035,16 +1035,16 @@ def _ninja_toolchains(version): repos = { "ninja_1.10.1_linux": [ "@platforms//cpu:x86_64", - "@platforms//os:linux" + "@platforms//os:linux", ], "ninja_1.10.1_mac": [ "@platforms//cpu:x86_64", - "@platforms//os:macos" + "@platforms//os:macos", ], "ninja_1.10.1_win": [ "@platforms//cpu:x86_64", - "@platforms//os:windows" - ] + "@platforms//os:windows", + ], }, tool = "ninja", ) @@ -1104,16 +1104,16 @@ def _ninja_toolchains(version): repos = { "ninja_1.10.0_linux": [ "@platforms//cpu:x86_64", - "@platforms//os:linux" + "@platforms//os:linux", ], "ninja_1.10.0_mac": [ "@platforms//cpu:x86_64", - "@platforms//os:macos" + "@platforms//os:macos", ], "ninja_1.10.0_win": [ "@platforms//cpu:x86_64", - "@platforms//os:windows" - ] + "@platforms//os:windows", + ], }, tool = "ninja", ) @@ -1173,16 +1173,16 @@ def _ninja_toolchains(version): repos = { "ninja_1.9.0_linux": [ "@platforms//cpu:x86_64", - "@platforms//os:linux" + "@platforms//os:linux", ], "ninja_1.9.0_mac": [ "@platforms//cpu:x86_64", - "@platforms//os:macos" + "@platforms//os:macos", ], "ninja_1.9.0_win": [ "@platforms//cpu:x86_64", - "@platforms//os:windows" - ] + "@platforms//os:windows", + ], }, tool = "ninja", ) @@ -1242,16 +1242,16 @@ def _ninja_toolchains(version): repos = { "ninja_1.8.2_linux": [ "@platforms//cpu:x86_64", - "@platforms//os:linux" + "@platforms//os:linux", ], "ninja_1.8.2_mac": [ "@platforms//cpu:x86_64", - "@platforms//os:macos" + "@platforms//os:macos", ], "ninja_1.8.2_win": [ "@platforms//cpu:x86_64", - "@platforms//os:windows" - ] + "@platforms//os:windows", + ], }, tool = "ninja", )