diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml index 4635370..122cd74 100644 --- a/.pre-commit-hooks.yaml +++ b/.pre-commit-hooks.yaml @@ -1,4 +1,12 @@ - id: alejandra + name: alejandra + description: Format Nix code with Alejandra. + entry: alejandra + language: rust + files: \.nix$ + minimum_pre_commit_version: 2.21.0 + +- id: alejandra-nix name: alejandra (Nix) description: Format Nix code with Alejandra. entry: .pre-commit-entry.sh diff --git a/CHANGELOG.md b/CHANGELOG.md index 4138204..9d196cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ Types of changes - Thank you messages for the different people who have helped improving Alejandra. +- A pre-commit hook with no prerequisites. ### Changed diff --git a/integrations/pre-commit/README.md b/integrations/pre-commit/README.md index 790f786..347c4bb 100644 --- a/integrations/pre-commit/README.md +++ b/integrations/pre-commit/README.md @@ -12,9 +12,12 @@ repos: # Choose either the 'alejandra' or 'alejandra-system' hook # depending on what pre-requisites you have: hooks: - # Requires Nix to be previously installed in the system + # No prerequisites - id: alejandra + # Requires Nix to be previously installed in the system + - id: alejandra-nix + # Requires Alejandra to be previously installed in the system - id: alejandra-system ```