diff options
| author | Igor Minar | 2013-10-24 14:55:17 -0700 |
|---|---|---|
| committer | Igor Minar | 2013-10-24 15:09:30 -0700 |
| commit | 1ae34aac811629df201c3d41d7976559cf7aaf5d (patch) | |
| tree | 5b15c7a704862b7a10f264abf225803ffa5c4844 | |
| parent | 82dec9b81e8e66d3fb63c3e7690b4bf5318dc65e (diff) | |
| download | angular.js-1ae34aac811629df201c3d41d7976559cf7aaf5d.tar.bz2 | |
chore(validate-commit-msg.js): increase the max line limit for commit messages from 70 to 100
| -rwxr-xr-x | changelog.js | 6 | ||||
| -rwxr-xr-x | validate-commit-msg.js | 2 | ||||
| -rw-r--r-- | validate-commit-msg.spec.js | 7 |
3 files changed, 4 insertions, 11 deletions
diff --git a/changelog.js b/changelog.js index 90ec01c4..b9a623f3 100755 --- a/changelog.js +++ b/changelog.js @@ -16,7 +16,6 @@ var LINK_ISSUE = '[#%s](https://github.com/angular/angular.js/issues/%s)'; var LINK_COMMIT = '[%s](https://github.com/angular/angular.js/commit/%s)'; var EMPTY_COMPONENT = '$$'; -var MAX_SUBJECT_LENGTH = 80; var warn = function() { @@ -54,11 +53,6 @@ var parseRawCommit = function(raw) { return null; } - if (match[3].length > MAX_SUBJECT_LENGTH) { - warn('Too long subject: %s %s', msg.hash, msg.subject); - match[3] = match[3].substr(0, MAX_SUBJECT_LENGTH); - } - msg.type = match[1]; msg.component = match[2]; msg.subject = match[3]; diff --git a/validate-commit-msg.js b/validate-commit-msg.js index ec853a46..da069998 100755 --- a/validate-commit-msg.js +++ b/validate-commit-msg.js @@ -12,7 +12,7 @@ var fs = require('fs'); var util = require('util'); -var MAX_LENGTH = 70; +var MAX_LENGTH = 100; var PATTERN = /^(?:fixup!\s*)?(\w*)(\(([\w\$\.\-\*/]*)\))?\: (.*)$/; var IGNORED = /^WIP\:/; var TYPES = { diff --git a/validate-commit-msg.spec.js b/validate-commit-msg.spec.js index d4b37775..cc4b4c3c 100644 --- a/validate-commit-msg.spec.js +++ b/validate-commit-msg.spec.js @@ -38,12 +38,11 @@ describe('validate-commit-msg.js', function() { }); - it('should validate 70 characters length', function() { - var msg = 'fix($compile): something super mega extra giga tera long, maybe even longer... ' + - 'way over 80 characters'; + it('should validate 100 characters length', function() { + var msg = "fix($compile): something super mega extra giga tera long, maybe even longer and longer and longer... "; expect(m.validateMessage(msg)).toBe(INVALID); - expect(errors).toEqual(['INVALID COMMIT MSG: is longer than 70 characters !']); + expect(errors).toEqual(['INVALID COMMIT MSG: is longer than 100 characters !']); }); |
