#!/usr/bin/env bash
# SPDX-FileCopyrightText: 2026 FocusFlow contributors
# SPDX-License-Identifier: AGPL-3.0-only

# Blocks commits that do not meet the repository's formatting, analyzer,
# documentation, or SPDX/REUSE metadata gates.
set -euo pipefail

root_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "$root_dir"

dart format --set-exit-if-changed packages apps scripts tool test
dart analyze
dart run tool/check_reuse.dart
dart run tool/check_docs.dart --skip-dartdoc
