treefmt.nix 823 B

1234567891011121314151617181920212223242526272829
  1. # SPDX-FileCopyrightText: 2024 Christina Sørensen
  2. # SPDX-License-Identifier: EUPL-1.2
  3. {
  4. projectRootFile = "Cargo.toml";
  5. programs = {
  6. nixfmt.enable = true; # nix
  7. statix.enable = true; # nix static analysis
  8. deadnix.enable = true; # find dead nix code
  9. # TODO https://github.com/numtide/treefmt-nix/issues/343
  10. #rustfmt.enable = true; # rust
  11. shellcheck.enable = true; # bash/shell
  12. taplo.enable = true; # toml
  13. yamlfmt.enable = true; # yaml
  14. };
  15. settings = {
  16. formatter = {
  17. shellcheck = {
  18. includes = [
  19. "*.sh"
  20. "./completions/bash/eza"
  21. ];
  22. excludes = [ ".envrc" ];
  23. };
  24. #rustfmt.excludes = [ "src/options/flags.rs" ];
  25. taplo.excludes = [ "tests/ptests/*.toml" ];
  26. yamlfmt.excludes = [ "./powertest.yaml" ];
  27. };
  28. };
  29. }