aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar √Čtienne Deparis 2020-10-10 13:32:50 +0200
committerGravatar √Čtienne Deparis 2020-10-10 13:32:50 +0200
commit7ef9d00ad3eadc13664ddb0bbf7fda1377967934 (patch)
tree078fb0f0b2119b787cc5e6f2b686df44ee048995
parent830dbd5ce612cd82e7f6f7f73251071f3ca30ac0 (diff)
downloadshell_utils-7ef9d00ad3eadc13664ddb0bbf7fda1377967934.tar.gz
shell_utils-7ef9d00ad3eadc13664ddb0bbf7fda1377967934.tar.xz
shell_utils-7ef9d00ad3eadc13664ddb0bbf7fda1377967934.zip
feat(git-hooks): Do not take comment lines into account
-rwxr-xr-xgit-hooks/git-commit-msg.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/git-hooks/git-commit-msg.rb b/git-hooks/git-commit-msg.rb
index bf8774a..86f2eb2 100755
--- a/git-hooks/git-commit-msg.rb
+++ b/git-hooks/git-commit-msg.rb
@@ -16,6 +16,7 @@ class CommitMsgChecker # rubocop:disable Metrics/ClassLength
@warnings = []
@lines = File.readlines(msg)
@summary = parse_summary(@lines.shift.strip)
+ @lines.delete_if { |line| line[0] == '#' }
@style = find_git_message_style
end