Debian Codegraph @

script/lint

raw
1 #!/bin/bash
2 ###############################################################################
3 # Copyright (C) Intel Corporation
4 #
5 # SPDX-License-Identifier: MIT
6 ###############################################################################
7 # Check code for issues.
8 set -o errexit
9
10 if [ -z "$BASH_VERSION" ]; then
11 echo "This script must be run under bash"
12 exit 1
13 fi
14
15 # Set script folder
16 script_dir="$( cd "$(dirname "${BASH_SOURCE[0]:-$0}")" >/dev/null 2>&1 ; pwd -P )"
17
18 # Set root folder
19 proj_dir="$( dirname "${script_dir}" )"
20
21 pushd "${proj_dir}"
22 pre-commit run --hook-stage manual gitlint-ci
23 pre-commit run --all-files
24 popd