statix: enable empty_pattern

Enable statix's empty_pattern rule and apply its auto-fixes across the affected modules and tests.
This commit is contained in:
Austin Horstman
2026-04-08 15:48:33 -05:00
parent 11ad9d2e42
commit 74b0e97937
13 changed files with 42 additions and 61 deletions

View File

@@ -67,7 +67,7 @@
toHyprconf' initialIndent attrs;
toKDL =
{ }:
_:
let
inherit (lib)
concatStringsSep
@@ -223,7 +223,7 @@
'';
toSCFG =
{ }:
_:
let
inherit (lib) concatStringsSep any;
inherit (builtins) typeOf replaceStrings elem;

View File

@@ -1,4 +1,3 @@
{ ... }:
{
time = "2025-11-25T02:56:51+00:00";
message = ''

View File

@@ -42,28 +42,26 @@ let
};
# Nix-representable format for Mopidy config.
mopidyConfFormat =
{ }:
{
type =
with types;
let
valueType =
nullOr (oneOf [
bool
float
int
str
(listOf valueType)
])
// {
description = "Mopidy config value";
};
in
attrsOf (attrsOf valueType);
mopidyConfFormat = _: {
type =
with types;
let
valueType =
nullOr (oneOf [
bool
float
int
str
(listOf valueType)
])
// {
description = "Mopidy config value";
};
in
attrsOf (attrsOf valueType);
generate = name: value: pkgs.writeText name (toMopidyConf value);
};
generate = name: value: pkgs.writeText name (toMopidyConf value);
};
settingsFormat = mopidyConfFormat { };

View File

@@ -73,30 +73,28 @@ let
# A specific type for Recoll config format. Taken from `pkgs.formats`
# implementation from nixpkgs. See the 'Nix-representable formats' from the
# NixOS manual for more information.
recollConfFormat =
{ }:
{
type =
with types;
let
valueType =
nullOr (oneOf [
bool
float
int
path
str
(attrsOf valueType)
(listOf valueType)
])
// {
description = "Recoll config value";
};
in
attrsOf valueType;
recollConfFormat = _: {
type =
with types;
let
valueType =
nullOr (oneOf [
bool
float
int
path
str
(attrsOf valueType)
(listOf valueType)
])
// {
description = "Recoll config value";
};
in
attrsOf valueType;
generate = name: value: pkgs.writeText name (toRecollConf { } value);
};
generate = name: value: pkgs.writeText name (toRecollConf { } value);
};
# The actual object we're going to use for this module. This is for the sake
# of consistency (and dogfooding the settings format implementation).

View File

@@ -5,7 +5,6 @@ disabled = [
"deprecated_to_path",
"empty_inherit",
"empty_let_in",
"empty_pattern",
"eta_reduction",
"faster_groupby",
"faster_zipattrswith",

View File

@@ -1,4 +1,3 @@
{ ... }:
{
programs.atool = {
enable = true;

View File

@@ -1,4 +1,3 @@
{ ... }:
{
programs.atool.enable = false;

View File

@@ -1,4 +1,3 @@
{ ... }:
{
config = {
programs.fish = {

View File

@@ -1,4 +1,3 @@
{ ... }:
{
programs.nom = {
enable = true;

View File

@@ -1,4 +1,3 @@
{ ... }:
{
programs.nom.enable = false;

View File

@@ -1,5 +1,3 @@
{ ... }:
{
programs.npm = {
enable = true;

View File

@@ -1,5 +1,3 @@
{ ... }:
{
programs.tirith = {
enable = true;

View File

@@ -1,7 +1,3 @@
{
...
}:
{
services.mpdscribble = {
enable = true;