From 66b4a6a8ca1ee55e5b7f05bae2543cf99fe22d6d Mon Sep 17 00:00:00 2001 From: Gunes Bayir Date: Sat, 1 Jul 2023 22:55:42 +0100 Subject: Setup pre-commit and include code formatting scripts This patch - includes our code formatting scripts used in our precommit pipeline - sets up pre-commit framework to help contributors validate their patches This has several benefits: - our repository becomes more inclusive to external contributions - we can use several hooks available online efficiently, w/o implementing our own - it speeds up our development flow and, it is completely optional. The pre-commit configuration includes running the following: - our code formatting scripts - CMake and Bazel build file generation scripts - hooks that check trailing whitespace, end of files, committed large files etc. The number of checks can easily be extended using pre-commit framework. Change-Id: I06bf1259715579d321f89820726a8301504c36d9 Signed-off-by: Gunes Bayir Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10064 Reviewed-by: Jakub Sujak Tested-by: Arm Jenkins Comments-Addressed: Arm Jenkins Benchmark: Arm Jenkins --- scripts/generate_build_files.py | 2 -- 1 file changed, 2 deletions(-) (limited to 'scripts/generate_build_files.py') diff --git a/scripts/generate_build_files.py b/scripts/generate_build_files.py index 0ca27179eb..61da7f23ed 100644 --- a/scripts/generate_build_files.py +++ b/scripts/generate_build_files.py @@ -280,14 +280,12 @@ if "__main__" in __name__: if args.bazel: bazel_build_string = build_from_template_bazel( graph_files, lib_files_sve, lib_files_sve2, lib_files) - print(bazel_build_string) with open("src/BUILD.bazel", "w") as fp: fp.write(bazel_build_string) if args.cmake: cmake_build_string = build_from_template_cmake( graph_files, lib_files_sve, lib_files_sve2, lib_files) - print(cmake_build_string) with open("src/CMakeLists.txt", "w") as fp: fp.write(cmake_build_string) -- cgit v1.2.1