treewide: format with new treefmt

This commit is contained in:
Gaetan Lepage 2025-07-25 16:27:30 +02:00
parent 0af5ef601d
commit b1b04e6161
34 changed files with 688 additions and 702 deletions

View file

@ -27,81 +27,79 @@
"JSON"
];
brokenTools =
[
#TODO Added 2025-04-01
# php-cs-fixer is marked as broken
"php_cs_fixer"
# TODO: Added 2025-04-19 broken dependency
"phan"
"php"
"phpcbf"
"phpcs"
"phpstan"
"psalm"
]
++ lib.optionals (hostPlatform.isLinux && hostPlatform.isAarch64) [
# TODO: 2025-04-20 build failure (swift-corelibs-xctest)
"swiftformat"
]
++ lib.optionals hostPlatform.isDarwin [
# As of 2024-01-04, texliveMedium is broken on darwin
# TODO: re-enable those tests when fixed
"chktex"
"latexindent"
brokenTools = [
#TODO Added 2025-04-01
# php-cs-fixer is marked as broken
"php_cs_fixer"
# TODO: Added 2025-04-19 broken dependency
"phan"
"php"
"phpcbf"
"phpcs"
"phpstan"
"psalm"
]
++ lib.optionals (hostPlatform.isLinux && hostPlatform.isAarch64) [
# TODO: 2025-04-20 build failure (swift-corelibs-xctest)
"swiftformat"
]
++ lib.optionals hostPlatform.isDarwin [
# As of 2024-01-04, texliveMedium is broken on darwin
# TODO: re-enable those tests when fixed
"chktex"
"latexindent"
# TODO 2025-04-20 build failure
"ansible_lint"
]
++ lib.optionals (hostPlatform.isDarwin && hostPlatform.isAarch64) [
# As of 2025-03-18, several python311Packages.* dependencies of bashate fail on aarch64-darwin
# TODO: re-enable this test when fixed
"bashate"
]
++ lib.optionals (hostPlatform.isDarwin && hostPlatform.isx86_64) [
# As of 2024-07-31, dmd is broken on x86_64-darwin
# https://github.com/NixOS/nixpkgs/pull/331373
# TODO: re-enable this test when fixed
"dmd"
];
# TODO 2025-04-20 build failure
"ansible_lint"
]
++ lib.optionals (hostPlatform.isDarwin && hostPlatform.isAarch64) [
# As of 2025-03-18, several python311Packages.* dependencies of bashate fail on aarch64-darwin
# TODO: re-enable this test when fixed
"bashate"
]
++ lib.optionals (hostPlatform.isDarwin && hostPlatform.isx86_64) [
# As of 2024-07-31, dmd is broken on x86_64-darwin
# https://github.com/NixOS/nixpkgs/pull/331373
# TODO: re-enable this test when fixed
"dmd"
];
# TODO: respect unpackaged from generated
unpackaged =
[
"blade_formatter"
"cljstyle"
"cspell"
"dartanalyzer"
"debride"
"deno_fmt"
"fecs"
"fixjson"
"forge_fmt"
"gersemi"
"gleam_format"
"js_standard"
"kdlfmt"
"markuplint"
"mix"
"pint"
"prettier_eslint"
"prettier_standard"
"redpen"
"reek"
"rome"
"ruff_sort"
"slim_lint"
"solhint"
"sorbet"
"swiftformat"
"swiftlint"
"xo"
]
++ lib.optionals pkgs.stdenv.isDarwin [ "clazy" ]
++ lib.optionals pkgs.stdenv.isAarch64 [
"dmd"
"smlfmt"
];
unpackaged = [
"blade_formatter"
"cljstyle"
"cspell"
"dartanalyzer"
"debride"
"deno_fmt"
"fecs"
"fixjson"
"forge_fmt"
"gersemi"
"gleam_format"
"js_standard"
"kdlfmt"
"markuplint"
"mix"
"pint"
"prettier_eslint"
"prettier_standard"
"redpen"
"reek"
"rome"
"ruff_sort"
"slim_lint"
"solhint"
"sorbet"
"swiftformat"
"swiftlint"
"xo"
]
++ lib.optionals pkgs.stdenv.isDarwin [ "clazy" ]
++ lib.optionals pkgs.stdenv.isAarch64 [
"dmd"
"smlfmt"
];
# Fetch the valid enum members from the tool options
toolsFromOptions =

View file

@ -104,46 +104,45 @@
sources =
let
disabled =
[
#TODO Added 2025-04-01
# php-cs-fixer is marked as broken
"phpcsfixer"
]
++ lib.optionals (hostPlatform.isLinux && hostPlatform.isAarch64) [
# Not available on aarch64-linux
"smlfmt"
disabled = [
#TODO Added 2025-04-01
# php-cs-fixer is marked as broken
"phpcsfixer"
]
++ lib.optionals (hostPlatform.isLinux && hostPlatform.isAarch64) [
# Not available on aarch64-linux
"smlfmt"
# TODO: 2025-04-20 build failure (swift-corelibs-xctest)
"swift_format"
# TODO: 2025-04-20 build failure (swift-corelibs-xctest)
"swift_format"
# TODO: 2025-04-20 build failure (open-policy-agent)
"opacheck"
"rego"
]
++ lib.optionals hostPlatform.isDarwin [
# TODO 2025-04-20 build failure
"ansiblelint"
# TODO 2025-06-24 build failure
"elm_format"
# TODO 2025-06-24 marked broken / unsupported platform
"clazy"
"haml_lint"
"racket_fixw"
"raco_fmt"
"rubyfmt"
# TODO: 2025-04-20 build failure (open-policy-agent)
"opacheck"
"rego"
]
++ lib.optionals hostPlatform.isDarwin [
# TODO 2025-04-20 build failure
"ansiblelint"
# TODO 2025-06-24 build failure
"elm_format"
# TODO 2025-06-24 marked broken / unsupported platform
"clazy"
"haml_lint"
"racket_fixw"
"raco_fmt"
"rubyfmt"
# TODO 2025-07-07 open-policy-agent is broken on darwin
"opacheck"
"rego"
]
++ lib.optionals (hostPlatform.isDarwin && hostPlatform.isx86_64) [
# TODO: 2025-06-24 build failure
"gleam_format"
"ptop"
# NOTE: No hash for x86 darwin
"verible_verilog_format"
];
# TODO 2025-07-07 open-policy-agent is broken on darwin
"opacheck"
"rego"
]
++ lib.optionals (hostPlatform.isDarwin && hostPlatform.isx86_64) [
# TODO: 2025-06-24 build failure
"gleam_format"
"ptop"
# NOTE: No hash for x86 darwin
"verible_verilog_format"
];
in
# Enable every none-ls source that has an option
lib.mapAttrs (

View file

@ -20,27 +20,26 @@
let
inherit (pkgs.stdenv) hostPlatform;
disabledSources =
[
# We do not provide the required HF_API_KEY environment variable.
"cmp_ai"
# Triggers the warning complaining about treesitter highlighting being disabled
"otter"
# Invokes the `nix` command at startup which is not available in the sandbox
"nixpkgs_maintainers"
# Needs internet access to download `sm-agent`
"supermaven"
# Sometimes get auth error
"codeium"
]
++ lib.optionals (hostPlatform.isLinux && hostPlatform.isAarch64) [
"cmp_tabnine"
]
++ lib.optionals hostPlatform.isDarwin [
# TODO: as of 2025-05-18, luajitPackages.luv is broken on darwin
# https://github.com/NixOS/nixpkgs/issues/408528
"papis"
];
disabledSources = [
# We do not provide the required HF_API_KEY environment variable.
"cmp_ai"
# Triggers the warning complaining about treesitter highlighting being disabled
"otter"
# Invokes the `nix` command at startup which is not available in the sandbox
"nixpkgs_maintainers"
# Needs internet access to download `sm-agent`
"supermaven"
# Sometimes get auth error
"codeium"
]
++ lib.optionals (hostPlatform.isLinux && hostPlatform.isAarch64) [
"cmp_tabnine"
]
++ lib.optionals hostPlatform.isDarwin [
# TODO: as of 2025-05-18, luajitPackages.luv is broken on darwin
# https://github.com/NixOS/nixpkgs/issues/408528
"papis"
];
in
pipe config.cmpSourcePlugins [
# All known source names