diff --git a/.editorconfig b/.editorconfig index ef4e49d..2909bf8 100644 --- a/.editorconfig +++ b/.editorconfig @@ -7,7 +7,10 @@ end_of_line = lf insert_final_newline = true trim_trailing_whitespace = true -[*.sh] +[git-check-assertions] +indent_size = 2 + +[*.bats] indent_size = 2 [*.nix] diff --git a/flake.nix b/flake.nix index 588b7bc..ec37673 100644 --- a/flake.nix +++ b/flake.nix @@ -17,7 +17,7 @@ packages.default = pkgs.writeShellApplication { name = "git-check-assertions"; runtimeInputs = [ pkgs.git ]; - text = builtins.readFile ./git-check-assertions.sh; + text = builtins.readFile ./git-check-assertions; }; devShells.default = pkgs.mkShell { packages = with pkgs; [ bats ]; diff --git a/git-check-assertions.sh b/git-check-assertions similarity index 100% rename from git-check-assertions.sh rename to git-check-assertions diff --git a/test.bats b/test.bats new file mode 100755 index 0000000..48965fd --- /dev/null +++ b/test.bats @@ -0,0 +1,10 @@ +#!/usr/bin/env bats + +setup() { + DIR="$( cd "$( dirname "$BATS_TEST_FILENAME" )" >/dev/null 2>&1 && pwd )" + PATH="$DIR:$PATH" +} + +@test "can run" { + git-check-assertions +}