feat: split treefmt into format and lint modules

This commit is contained in:
Venkatesan Ravi
2025-11-22 21:32:13 -08:00
parent 1d867de8e4
commit b72bce14c9
3 changed files with 33 additions and 22 deletions

View File

@@ -31,15 +31,17 @@
perSystem = {system, ...}: let
pkgs = nixpkgs.legacyPackages.${system};
treefmtEval = treefmt-nix.lib.evalModule pkgs ./nix/formatting/treefmt.nix;
treefmtFormatEval = treefmt-nix.lib.evalModule pkgs ./nix/formatting/treefmt-format.nix;
treefmtLintEval = treefmt-nix.lib.evalModule pkgs ./nix/formatting/treefmt-lint.nix;
in {
checks =
{
formatting = treefmtEval.config.build.check inputs.self;
formatting = treefmtFormatEval.config.build.check inputs.self;
linting = treefmtLintEval.config.build.check inputs.self;
}
// import ./nix/tests/integration {inherit pkgs;};
formatter = treefmtEval.config.build.wrapper;
formatter = treefmtFormatEval.config.build.wrapper;
packages = let
package = import ./nix/package.nix {

View File

@@ -1,28 +1,30 @@
{
lib,
pkgs,
system,
...
}: {
projectRootFile = "flake.nix";
programs = {
deadnix = {
enable = true;
priority = 10;
};
statix = {
enable = true;
priority = 20;
};
alejandra = {
enable = true;
priority = 30;
};
black = {
prettier = {
enable = true;
includes = [
"*.py"
];
priority = 80;
};
deadnix = {
enable = true;
priority = 10;
priority = 50;
settings.editorconfig = true;
};
deno = {
@@ -42,15 +44,12 @@
profile = "black";
};
prettier = {
black = {
enable = true;
priority = 50;
settings.editorconfig = true;
};
statix = {
enable = true;
priority = 20;
includes = [
"*.py"
];
priority = 80;
};
};

View File

@@ -0,0 +1,10 @@
_: {
projectRootFile = "flake.nix";
programs = {
nixf-diagnose = {
enable = true;
priority = 10;
};
};
}