fix(devshell): install pre-commit hook and enable rustfmt #22
No reviewers
Labels
No labels
backport release 26.05
bug
duplicate
enhancement
fix
good first issue
gui
nix
planned
question
refactor
security
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
xinux/e-imzo-manager!22
Loading…
Reference in a new issue
No description provided.
Delete branch "zeta/e-imzo-manager:main"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixed two issues with formatting/hooks:
Running nix develop never installed the pre-commit hook, because the custom devShell wasn't calling the install script that xinux-lib provides.
Rust files weren't covered by the formatter — added rustfmt to the config.
Both are fixed in shells/e-imzo-manager/default.nix.
because the custom devShell wasn't calling the install script that xinux-lib provides.I cannot recall that xinux-lib provides install script?
@ -19,3 +19,3 @@*po~.cargo.cargo.pre-commit-config.yamlmove
.pre-commit-config.yamlone line below, just pressing enter :}I cannot recall that xinux-lib provides install script? - I checked xinux-lib. That install script (config.pre-commit.installationScript) is only used in xinux-lib's own dev shell, via flake-parts. It's not passed down through create-shells/channels, which is what per-repo shells like this one actually use — so there's currently no shared version to hook into.
This PR sets up treefmtEval/preCommitCheck locally instead, following the same pattern xinux-lib's own shell.nix uses. want me to make this available to all repos through xinux-lib later, if that'd help or later?
currently itʻs ok to have each repoʼs own treefmt config