#!/bin/bash
#############################################################
####     Formats the codebase using dart formatter       ####
#############################################################
# Only do this because the pub.dev degrease the pub points  #
# and there is no way to ignore autogenerated files.        #
#############################################################


# Fail if any command fails
set -e

echo "🔎 Checking Dart formatting..."
dart format --output=none --set-exit-if-changed .

echo "✅ Dart code is properly formatted."

echo "🔍 Running Dart analyzer..."
dart analyze --fatal-infos

echo "✅ Dart analysis passed."
