diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b950ed3..7005a67 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -17,7 +17,9 @@ repos: - id: destroyed-symlinks - id: check-merge-conflict - id: detect-private-key - - id: check-shebang-scripts-are-executable + - exclude_types: + - rust + id: check-shebang-scripts-are-executable - id: check-executables-have-shebangs repo: builtin - hooks: diff --git a/nix/general/pre-commit-hooks.nix b/nix/general/pre-commit-hooks.nix index c6e6f92..c9f750e 100644 --- a/nix/general/pre-commit-hooks.nix +++ b/nix/general/pre-commit-hooks.nix @@ -78,7 +78,13 @@ importingFlake: { # # { id = "no-commit-to-branch"; } - { id = "check-shebang-scripts-are-executable"; } + { + id = "check-shebang-scripts-are-executable"; + exclude_types = [ + # Rust macros can look like shebangs + "rust" + ]; + } { id = "check-executables-have-shebangs"; } ]; }