From 3071cf9fc5bc02e5ca7eae5d9f448585fbe00cab Mon Sep 17 00:00:00 2001 From: Jasmin Eilers <4738799+jaeilers@users.noreply.github.com> Date: Thu, 21 May 2026 20:37:02 +0200 Subject: [PATCH 1/2] Limit formatting to staged files --- lefthook.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lefthook.yml b/lefthook.yml index 3a5b034..55ba735 100644 --- a/lefthook.yml +++ b/lefthook.yml @@ -3,5 +3,6 @@ pre-commit: fail_on_changes: "always" fail_on_changes_diff: false jobs: - - name: Format Swift files & abort commit if needed - run: swiftformat Sources --config .swiftformat + - name: Format Swift files + glob: "*.swift" + run: swiftformat {staged_files} --config .swiftformat From 43dc6d8cd99f3964d1811efc111f3bdd09183725 Mon Sep 17 00:00:00 2001 From: Jasmin Eilers <4738799+jaeilers@users.noreply.github.com> Date: Thu, 21 May 2026 20:42:27 +0200 Subject: [PATCH 2/2] Consistently use home path --- NSAttributedStringBuilder.xcodeproj/project.pbxproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NSAttributedStringBuilder.xcodeproj/project.pbxproj b/NSAttributedStringBuilder.xcodeproj/project.pbxproj index 20a42fc..137ef9d 100644 --- a/NSAttributedStringBuilder.xcodeproj/project.pbxproj +++ b/NSAttributedStringBuilder.xcodeproj/project.pbxproj @@ -226,7 +226,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "# Installs commit hooks\nif [[ -d \"$HOME/.rbenv\" ]]; then\n export PATH=~/.rbenv/shims:$PATH\n bundle exec lefthook install\nelse\n echo \"warning: Please install rbenv\"\nfi\n"; + shellScript = "# Installs commit hooks\nif [[ -d \"$HOME/.rbenv\" ]]; then\n export PATH=\"$HOME/.rbenv/shims:$PATH\"\n bundle exec lefthook install\nelse\n echo \"warning: Please install rbenv\"\nfi\n"; }; /* End PBXShellScriptBuildPhase section */