-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathtreefmt.nix
More file actions
28 lines (28 loc) · 869 Bytes
/
Copy pathtreefmt.nix
File metadata and controls
28 lines (28 loc) · 869 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# See available programs from https://github.com/numtide/treefmt-nix/tree/main/programs
{inputs, ...}: {
imports = [inputs.treefmt-nix.flakeModule];
perSystem = {
pkgs,
lib,
...
}: {
treefmt = {
settings.on-unmatched = "fatal"; # Ensure 100% coverage
settings.global.excludes = lib.mkAfter [
".editorconfig"
".github/workflows/release.yml"
];
programs.actionlint.enable = true; # github action linter
programs.alejandra.enable = true; # nix
programs.jsonfmt.enable = true; # json
programs.mdformat.enable = true; # markdown
programs.rustfmt = {
enable = true; # rust
edition =
(builtins.fromTOML (builtins.readFile ./Cargo.toml)).package.edition;
};
programs.taplo.enable = true; # toml
programs.xmllint.enable = true; # xml
};
};
}