From 3a0dc74bbf56ec027a4b3bc61560a214223cfc3e Mon Sep 17 00:00:00 2001 From: Paul Meyer <49727155+katexochen@users.noreply.github.com> Date: Fri, 5 Jan 2024 13:58:07 +0100 Subject: [PATCH] nix: add golangci-lint to checks Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com> --- flake.nix | 1 + packages/default.nix | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/flake.nix b/flake.nix index 806de036ce..32a30057ac 100644 --- a/flake.nix +++ b/flake.nix @@ -39,6 +39,7 @@ checks = { formatting = treefmtEval.config.build.check self; + inherit (self.packages.${system}) golangci-lint; }; legacyPackages = pkgs; diff --git a/packages/default.nix b/packages/default.nix index 97a15fa353..ce051b9e97 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -127,4 +127,10 @@ rec { runtimeInputs = [ go pkgs.govulncheck ]; text = ''govulncheck "$@"''; }; + + golangci-lint = writeShellApplication { + name = "golangci-lint"; + runtimeInputs = [ go pkgs.golangci-lint ]; + text = ''golangci-lint "$@"''; + }; }