3# Get the directory where the script is located
4SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
5PROJECT_ROOT="$( cd "$SCRIPT_DIR/.." && pwd )"
7# Check Python code formatting
8echo "Checking Python code formatting..."
9if ! black --check "$PROJECT_ROOT/zia_benchmark/src/zia_benchmark"; then
10 echo "Python code is not properly formatted!"
11 echo "Please run './devel/format_code.sh' to format the code"
12 exit 1
13fi
15# Check TypeScript/JavaScript code formatting
16echo "Checking TypeScript/JavaScript code formatting..."
17cd "$PROJECT_ROOT/web-ui"
18if ! npm run format:check; then
19 echo "TypeScript/JavaScript code is not properly formatted!"
20 echo "Please run './devel/format_code.sh' to format the code"
21 exit 1
22fi
24echo "All code is properly formatted!"
25exit 0