treefmt.nix 769 B

12345678910111213141516171819202122232425262728
  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. taplo.excludes = [ "tests/ptests/*.toml" ];
  25. yamlfmt.excludes = [ "./powertest.yaml" ];
  26. };
  27. };
  28. }