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:
parent
11ad9d2e42
commit
74b0e97937
13 changed files with 42 additions and 61 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
{ ... }:
|
||||
{
|
||||
time = "2025-11-25T02:56:51+00:00";
|
||||
message = ''
|
||||
|
|
|
|||
|
|
@ -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 { };
|
||||
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ disabled = [
|
|||
"deprecated_to_path",
|
||||
"empty_inherit",
|
||||
"empty_let_in",
|
||||
"empty_pattern",
|
||||
"eta_reduction",
|
||||
"faster_groupby",
|
||||
"faster_zipattrswith",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.atool = {
|
||||
enable = true;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.atool.enable = false;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
{ ... }:
|
||||
{
|
||||
config = {
|
||||
programs.fish = {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.nom = {
|
||||
enable = true;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.nom.enable = false;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
programs.npm = {
|
||||
enable = true;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
programs.tirith = {
|
||||
enable = true;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,3 @@
|
|||
{
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
services.mpdscribble = {
|
||||
enable = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue