treefmt.nix 760 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. rustfmt.enable = true; # rust
  10. shellcheck.enable = true; # bash/shell
  11. taplo.enable = true; # toml
  12. yamlfmt.enable = true; # yaml
  13. };
  14. settings = {
  15. formatter = {
  16. shellcheck = {
  17. includes = [
  18. "*.sh"
  19. "./completions/bash/eza"
  20. ];
  21. excludes = [ ".envrc" ];
  22. };
  23. rustfmt.excludes = [ "src/options/flags.rs" ];
  24. taplo.excludes = [ "tests/ptests/*.toml" ];
  25. yamlfmt.excludes = [ "./powertest.yaml" ];
  26. };
  27. };
  28. }