Add sample pre-commit hook (#2470)

Using pre-commit hooks helps us to decrease CI load and improve developers' experience.
This commit is contained in:
Maks Litskevich
2023-08-18 03:40:05 +01:00
committed by GitHub
parent 2cb701f7f3
commit 0e12cdec48
2 changed files with 47 additions and 0 deletions

15
ci/setup.sh Executable file
View File

@ -0,0 +1,15 @@
#!/bin/bash
# Copyright (C) 2023 Amazon.com Inc. or its affiliates. All rights reserved.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# This script executes some commands to make your onboarding with WAMR easier.
# For example, setting pre-commit hook that will make your code complaint with the
# code style requirements checked in WAMR CI
echo "Copy the pre-commit hook to your hooks folder"
cp pre_commit_hook_sample ../.git/hooks/pre-commit
# Feel free to propose your commands to this script to make developing WAMR easier
echo "Setup is done"