#!/bin/bash # Copyright (c) 2023 Xu Shaohua . All rights reserved. # Use of this source is governed by General Public License that can be found # in the LICENSE file. # Make sure each commit is linted # Install this script to `.git/hooks/pre-commit` set -xe cargo clippy --all-targets --all-features --fix --allow-dirty --allow-staged cargo fmt --all