From b4645fbf29e18ee3e2aefe44f3570f15c7526514 Mon Sep 17 00:00:00 2001 From: Barrett Ruth Date: Thu, 5 Mar 2026 13:42:50 -0500 Subject: [PATCH] ci: format --- config/nvim/lua/plugins/git.lua | 3 ++- flake.nix | 1 + scripts/ci.sh | 14 ++++++++++++++ scripts/ctl | 10 ++++++++-- 4 files changed, 25 insertions(+), 3 deletions(-) create mode 100755 scripts/ci.sh diff --git a/config/nvim/lua/plugins/git.lua b/config/nvim/lua/plugins/git.lua index b41fb66..e271d8a 100644 --- a/config/nvim/lua/plugins/git.lua +++ b/config/nvim/lua/plugins/git.lua @@ -2,7 +2,8 @@ vim.pack.add({ 'https://github.com/tpope/vim-fugitive', }) -function _G._fugitive_stl() -- selene: allow(global_usage) +-- selene: allow(global_usage) +function _G._fugitive_stl() local s = vim.fn.FugitiveStatusline() return s ~= '' and s .. ' ' or '' end diff --git a/flake.nix b/flake.nix index 88912df..431ed22 100644 --- a/flake.nix +++ b/flake.nix @@ -107,6 +107,7 @@ pkgs.nixfmt pkgs.pre-commit pkgs.nodePackages.prettier + pkgs.shfmt pkgs.stylua pkgs.selene ]; diff --git a/scripts/ci.sh b/scripts/ci.sh new file mode 100755 index 0000000..893d502 --- /dev/null +++ b/scripts/ci.sh @@ -0,0 +1,14 @@ +#!/bin/sh +set -eu + +nix fmt +git diff --exit-code -- '*.nix' +nix develop --command deadnix --fail --no-lambda-pattern-names -- **/*.nix +nix develop --command statix check + +nix develop --command stylua --check config/nvim +git ls-files '*.lua' | xargs nix develop --command selene --display-style quiet --config config/nvim/selene.toml + +nix develop --command shfmt -i 2 -d scripts/ config/claude/hooks/guard.sh + +nix develop --command prettier --check . diff --git a/scripts/ctl b/scripts/ctl index 8f79813..7a5d8af 100755 --- a/scripts/ctl +++ b/scripts/ctl @@ -120,8 +120,14 @@ audio) --mesg="$header" --mesg-mode=expand \ --font="monospace:size=12" --width="$fw") rc=$? - [ "$rc" = 11 ] && { wpctl set-volume "$node" 5%+ --limit 1.0; continue; } - [ "$rc" = 12 ] && { wpctl set-volume "$node" 5%-; continue; } + [ "$rc" = 11 ] && { + wpctl set-volume "$node" 5%+ --limit 1.0 + continue + } + [ "$rc" = 12 ] && { + wpctl set-volume "$node" 5%- + continue + } [ -z "$choice" ] && exit 0 wpctl set-default "$choice" break