mirror of
https://github.com/tgirlcloud/locker.git
synced 2026-07-04 18:42:25 +00:00
a linter for your flake.lock file
- Rust 94.2%
- Nix 5.8%
| .github/workflows | ||
| docs | ||
| src | ||
| test | ||
| tests | ||
| .envrc | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| default.nix | ||
| flake.lock | ||
| flake.nix | ||
| LICENSE | ||
| shell.nix | ||
Locker
Locker is a tool designed to lint your flake.lock file to find duplicate entries by their flake uri.
Usage
locker <flake-lock-file>
treefmt
locker can run as a treefmt formatter.
It checks rather than rewrites files, so a non-zero exit reports the check as
failed.
[formatter.locker]
command = "locker"
includes = ["flake.lock"]
treefmt passes every matched flake.lock as a positional argument; locker
checks each one and fails the run if any contains duplicate inputs.
GitHub Action
name: Validate Flake Lock
on:
workflow_dispatch:
push:
paths:
- "**.lock"
jobs:
check-flake:
name: Check Lock
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v31
- name: Check flake.lock
run: nix run github:tgirlcloud/locker
