Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions nix/general/formatting.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@

excludes = config.filegen.generatedFiles;
};

# We include shfmt in general, because all projects probably use shell scripts
programs.shfmt = {
enable = true;
# Setting the indent_size to 0 uses tabs for indentation
indent_size = 0;
};
settings.formatter.shfmt.command = "shfmt";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing simplify in Nix config

Medium Severity

Issue: treefmt.toml enables shfmt -s, but programs.shfmt only sets indent_size and never enables simplify (or equivalent settings.formatter.shfmt.options). Since treefmt.toml is generated from Nix via filegen, the next apply will drop -s or fail the prek filegen check.

Fix: Enable simplify in the Nix source of truth (e.g. programs.shfmt.simplify = true, or append "-s" the same way nixfmt sets "--strict"), then regenerate treefmt.toml.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 6651153. Configure here.


};

filegen.settings.files = [
Expand Down
6 changes: 6 additions & 0 deletions treefmt.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.