30cargo-clippy-errors
1 #!/bin/bash 2 ## checks 'cargo clippy' for errors only 3 require git cargo 4 5 is_cargo_project || return 0 6 git_hook_matches "pre-commit" "pre-merge-commit" || return 0 7 git_branch_matches "devel" || return 0 8 9 function clippy_errors 10 { 11 cargo clippy 2>&1 | tee /dev/stderr | awk '/error.*: /{exit 1}' 12 } 13 14 run_test clippy_errors