Skip to content

Commit

Permalink
chore(validate-commit-msg): allow * and - in scope string
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorMinar committed Oct 18, 2012
1 parent d938983 commit 175e727
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion validate-commit-msg.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ var util = require('util');


var MAX_LENGTH = 70;
var PATTERN = /^(\w*)(\(([\w\$\.]*)\))?\: (.*)$/;
var PATTERN = /^(\w*)(\(([\w\$\.\-\*]*)\))?\: (.*)$/;
var IGNORED = /^WIP\:/;
var TYPES = {
feat: true,
Expand Down
2 changes: 2 additions & 0 deletions validate-commit-msg.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ describe('validate-commit-msg.js', function() {
expect(m.validateMessage('refactor($httpBackend): something')).toBe(VALID);
expect(m.validateMessage('test($resource): something')).toBe(VALID);
expect(m.validateMessage('chore($controller): something')).toBe(VALID);
expect(m.validateMessage('chore(foo-bar): something')).toBe(VALID);
expect(m.validateMessage('chore(*): something')).toBe(VALID);
expect(errors).toEqual([]);
});

Expand Down

0 comments on commit 175e727

Please sign in to comment.