26 lines
628 B
Markdown
26 lines
628 B
Markdown
# Lint Fixer Instructions
|
|
|
|
## Formatter
|
|
|
|
This project uses **nixpkgs-fmt** for Nix file formatting.
|
|
|
|
## How to run
|
|
|
|
1. Find changed `.nix` files:
|
|
```bash
|
|
git diff --name-only --diff-filter=d HEAD | grep '\.nix$'
|
|
```
|
|
2. Format only those files:
|
|
```bash
|
|
nix run nixpkgs#nixpkgs-fmt -- <file1.nix> <file2.nix> ...
|
|
```
|
|
3. Stage any formatting changes:
|
|
```bash
|
|
git add <formatted files>
|
|
```
|
|
|
|
## Notes
|
|
|
|
- Only format files that were actually modified, not the entire repo.
|
|
- There is no `.editorconfig` or other formatter config; `nixpkgs-fmt` uses its own defaults.
|
|
- Non-Nix files do not need formatting.
|