diff options
| author | seth <[email protected]> | 2023-12-31 08:01:03 -0500 |
|---|---|---|
| committer | seth <[email protected]> | 2023-12-31 08:52:04 -0500 |
| commit | dec8d36cbdbb3b9c5c12792ed199892ce2e82069 (patch) | |
| tree | 89422c04c25b4ed4c3156d4477c894416500e8b3 /checks.nix | |
| parent | ae9136a14ae0b0fe91faad59b23d3a532ca84ed5 (diff) | |
back to regular lua
Diffstat (limited to 'checks.nix')
| -rw-r--r-- | checks.nix | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/checks.nix b/checks.nix new file mode 100644 index 0000000..7773b11 --- /dev/null +++ b/checks.nix @@ -0,0 +1,51 @@ +{ + pkgs, + self, +}: let + inherit (pkgs) lib; + formatter = self.formatter.${pkgs.system}; +in { + check-actionlint = + pkgs.runCommand "check-actionlint" { + nativeBuildInputs = [pkgs.actionlint]; + } '' + actionlint ${./.}/.github/workflows/* + touch $out + ''; + + "check-${formatter.pname}" = + pkgs.runCommand "check-${formatter.pname}" { + nativeBuildInputs = [formatter]; + } '' + ${lib.getExe formatter} --check ${./.} + touch $out + ''; + + check-statix = + pkgs.runCommand "check-statix" { + nativeBuildInputs = [pkgs.statix]; + } + '' + statix check ${./.} + touch $out + ''; + + check-nil = + pkgs.runCommand "check-nil" { + nativeBuildInputs = with pkgs; [fd git nil]; + } + '' + cd ${./.} + fd . -e 'nix' | while read -r file; do + nil diagnostics "$file" + done + + touch $out + ''; + + check-stylua = pkgs.runCommand "check-stylua" {} '' + ${lib.getExe pkgs.stylua} --check ${./.} + + touch $out + ''; +} |
