feat(nix): lint let binding order #59

Merged
alexion merged 1 commits from feat/nix-style-linter-let-order into main 2026-09-16 18:14:05 -04:00
Owner

Summary

  • Adds the built-in let-order rule to nix-style-linter.
  • Reports plain identifier let bindings that reference later sibling bindings.
  • Supports previous-line suppressions with disable-next-line let-order -- reason.
  • Removes the promoted Markdown dependency-order rule from the Nix style guide.

Verification

  • bazel run //third_party:vendor_crates
  • bazel test //src/nix-style-linter:lib_test
  • Smoke tested forward reference, ordered input, suppression, and malformed input.
  • LSP diagnostics passed for src/nix-style-linter/lib.rs and src/nix-style-linter/lib_test.rs.

Notes

  • The first rule implementation is intentionally narrow.
  • Dotted attributes, quoted attributes, dynamic attributes, inherit, and pattern cases stay out of scope.
## Summary - Adds the built-in `let-order` rule to `nix-style-linter`. - Reports plain identifier `let` bindings that reference later sibling bindings. - Supports previous-line suppressions with `disable-next-line let-order -- reason`. - Removes the promoted Markdown dependency-order rule from the Nix style guide. ## Verification - `bazel run //third_party:vendor_crates` - `bazel test //src/nix-style-linter:lib_test` - Smoke tested forward reference, ordered input, suppression, and malformed input. - LSP diagnostics passed for `src/nix-style-linter/lib.rs` and `src/nix-style-linter/lib_test.rs`. ## Notes - The first rule implementation is intentionally narrow. - Dotted attributes, quoted attributes, dynamic attributes, `inherit`, and pattern cases stay out of scope.
alexion added 1 commit 2026-09-16 18:13:42 -04:00
alexion force-pushed feat/nix-style-linter-let-order from cebf9bed9f to 885124c240 2026-09-16 18:13:42 -04:00 Compare
alexion merged commit 885124c240 into main 2026-09-16 18:14:05 -04:00
alexion deleted branch feat/nix-style-linter-let-order 2026-09-16 18:14:05 -04:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: alexion/dev#59