Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 1ae34aa

Browse files
committed
chore(validate-commit-msg.js): increase the max line limit for commit messages from 70 to 100
1 parent 82dec9b commit 1ae34aa

File tree

3 files changed

+4
-11
lines changed

3 files changed

+4
-11
lines changed

changelog.js

-6
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ var LINK_ISSUE = '[#%s](https://github.com/angular/angular.js/issues/%s)';
1616
var LINK_COMMIT = '[%s](https://github.com/angular/angular.js/commit/%s)';
1717

1818
var EMPTY_COMPONENT = '$$';
19-
var MAX_SUBJECT_LENGTH = 80;
2019

2120

2221
var warn = function() {
@@ -54,11 +53,6 @@ var parseRawCommit = function(raw) {
5453
return null;
5554
}
5655

57-
if (match[3].length > MAX_SUBJECT_LENGTH) {
58-
warn('Too long subject: %s %s', msg.hash, msg.subject);
59-
match[3] = match[3].substr(0, MAX_SUBJECT_LENGTH);
60-
}
61-
6256
msg.type = match[1];
6357
msg.component = match[2];
6458
msg.subject = match[3];

validate-commit-msg.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ var fs = require('fs');
1212
var util = require('util');
1313

1414

15-
var MAX_LENGTH = 70;
15+
var MAX_LENGTH = 100;
1616
var PATTERN = /^(?:fixup!\s*)?(\w*)(\(([\w\$\.\-\*/]*)\))?\: (.*)$/;
1717
var IGNORED = /^WIP\:/;
1818
var TYPES = {

validate-commit-msg.spec.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,11 @@ describe('validate-commit-msg.js', function() {
3838
});
3939

4040

41-
it('should validate 70 characters length', function() {
42-
var msg = 'fix($compile): something super mega extra giga tera long, maybe even longer... ' +
43-
'way over 80 characters';
41+
it('should validate 100 characters length', function() {
42+
var msg = "fix($compile): something super mega extra giga tera long, maybe even longer and longer and longer... ";
4443

4544
expect(m.validateMessage(msg)).toBe(INVALID);
46-
expect(errors).toEqual(['INVALID COMMIT MSG: is longer than 70 characters !']);
45+
expect(errors).toEqual(['INVALID COMMIT MSG: is longer than 100 characters !']);
4746
});
4847

4948

0 commit comments

Comments
 (0)