#!/usr/bin/env bash

git stash -q --keep-index


nix flake check

if [ $? -eq 0 ]; then
    exit 1
fi

./lint.sh

RESULT=$?

git add -u

exit $RESULT