From 7b564393779f5801eb8284427c1d055e60978162 Mon Sep 17 00:00:00 2001 From: Arandi Lopez Date: Tue, 9 Sep 2025 12:57:55 -0600 Subject: [PATCH] feat: make deps a valid type --- lib/commitlint.rb | 2 +- test/test_linter.rb | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/commitlint.rb b/lib/commitlint.rb index 138d438..52aace7 100644 --- a/lib/commitlint.rb +++ b/lib/commitlint.rb @@ -8,7 +8,7 @@ module Commitlint class Error < StandardError; end - VALID_TYPES = %w[feat fix docs style refactor perf test chore revert].freeze + VALID_TYPES = %w[feat fix docs style refactor perf test chore revert deps].freeze CONVENTIONAL_COMMIT_SCHEMA = /(?x) ^(?#{VALID_TYPES.join("|")}) # Type (\((?.*?)\))? # Optional scope diff --git a/test/test_linter.rb b/test/test_linter.rb index 449988a..575152b 100644 --- a/test/test_linter.rb +++ b/test/test_linter.rb @@ -55,4 +55,11 @@ def test_lint_invalid_subject linter = Commitlint::Linter.new(invalid_subject, output: false) assert_equal 1, linter.lint! end + + def test_deps_type + message = "deps: update dependencies" + linter = Commitlint::Linter.new(message, output: false) + + assert_equal 0, linter.lint! + end end