Make the fix_line_endings tool usable by consumers

This commit is contained in:
2025-07-20 22:15:25 +02:00
parent 3a28f8f5b2
commit 3b0648262a
7 changed files with 14 additions and 10 deletions

View File

@@ -2,7 +2,7 @@
# #
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
module(name = "asl", version = "0.5.1") module(name = "asl", version = "0.5.2")
bazel_dep(name = "platforms", version = "0.0.11") bazel_dep(name = "platforms", version = "0.0.11")
bazel_dep(name = "rules_license", version = "1.0.0") bazel_dep(name = "rules_license", version = "1.0.0")

View File

@@ -1,2 +1,3 @@
constexpr cast from void* +cpp26 https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2738r1.pdf constexpr cast from void* +cpp26 https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2738r1.pdf
expose fix_line_endings

View File

@@ -3,7 +3,6 @@
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
load("@rules_python//python:py_binary.bzl", "py_binary") load("@rules_python//python:py_binary.bzl", "py_binary")
load("@hedron_compile_commands//:refresh_compile_commands.bzl", "refresh_compile_commands")
package( package(
default_applicable_licenses = ["//:license"], default_applicable_licenses = ["//:license"],
@@ -14,10 +13,5 @@ py_binary(
srcs = [ srcs = [
"fix_line_endings.py", "fix_line_endings.py",
], ],
visibility = ["//:__subpackages__"], visibility = ["//visibility:public"],
)
refresh_compile_commands(
name = "refresh_clangd",
targets = "//...",
) )

View File

@@ -44,6 +44,7 @@ def fix_file(file):
fp.writelines(lines) fp.writelines(lines)
if __name__ == "__main__": if __name__ == "__main__":
print(os.getenv("BUILD_WORKSPACE_DIRECTORY"))
os.chdir(os.getenv("BUILD_WORKSPACE_DIRECTORY")) os.chdir(os.getenv("BUILD_WORKSPACE_DIRECTORY"))
files = get_git_files() files = get_git_files()

View File

@@ -1 +0,0 @@
bazel run //tools:refresh_clangd

View File

@@ -1 +0,0 @@
bazel run //tools:refresh_clangd

View File

@@ -0,0 +1,10 @@
# Copyright 2025 Steven Le Rouzic
#
# SPDX-License-Identifier: BSD-3-Clause
load("@hedron_compile_commands//:refresh_compile_commands.bzl", "refresh_compile_commands")
refresh_compile_commands(
name = "refresh_clangd",
targets = "//...",
)