@@ -5,7 +5,6 @@ const diff = require('./diff')
55const info = require ( './info' )
66
77const fail = chalk . red ( '✖' )
8- const pass = chalk . green ( '✔' )
98
109function line ( obj ) {
1110 return obj . lineNum ? obj . lineNum : ''
@@ -19,14 +18,6 @@ function rpad(str, max) {
1918 return str
2019}
2120
22- function lpad ( str , max ) {
23- const diff = max - str . length + 1
24- if ( diff > 0 ) {
25- return `${ ' ' . repeat ( diff ) } ${ str } `
26- }
27- return str
28- }
29-
3021function getInfo ( s ) {
3122 return rpad ( info [ s ] || '' , 40 )
3223}
@@ -37,7 +28,6 @@ exports.default = (obj, commit) => {
3728 ? chalk . grey ( rpad ( `${ line ( obj ) } :0` , 6 ) )
3829 : rpad ( '' , 6 )
3930
40- const str = obj . str
4131 const i = getInfo ( obj . code )
4232
4333 return ` ${ fail } ${ lin } ${ i } ${ t } `
@@ -51,7 +41,6 @@ exports.ETITLETOOLONG = (obj, commit) => {
5141 const t = chalk . red ( 'ETITLETOOLONG' )
5242 const lin = chalk . grey ( rpad ( `${ line ( obj ) } :50` , 6 ) )
5343 const str = obj . str
54- const l = str . length
5544 const i = getInfo ( 'ETITLETOOLONG' )
5645 return ` ${ fail } ${ lin } ${ i } ${ t }
5746 ${ diff . ETITLETOOLONG ( str ) } `
@@ -60,11 +49,9 @@ exports.ETITLETOOLONG = (obj, commit) => {
6049exports . EINVALIDSUBSYSTEM = ( obj , commit ) => {
6150 const t = chalk . red ( 'EINVALIDSUBSYSTEM' )
6251 const title = commit . title
63- const subs = commit . subsystems . join ( ',' )
6452 const col = title . indexOf ( obj . str )
6553 const lin = chalk . grey ( rpad ( `${ line ( obj ) } :${ col } ` , 6 ) )
6654 const str = obj . str
67- const l = str . length
6855 const i = getInfo ( 'EINVALIDSUBSYSTEM' )
6956 return ` ${ fail } ${ lin } ${ i } ${ t }
7057 ${ diff . EINVALIDSUBSYSTEM ( str , title ) } `
@@ -74,7 +61,6 @@ exports.ELINETOOLONG = (obj, commit) => {
7461 const t = chalk . red ( 'ELINETOOLONG' )
7562 const lin = chalk . grey ( rpad ( `${ line ( obj ) } :72` , 6 ) )
7663 const str = obj . str
77- const l = str . length
7864 const i = getInfo ( 'ELINETOOLONG' )
7965 return ` ${ fail } ${ lin } ${ i } ${ t }
8066 ${ diff . ELINETOOLONG ( str ) } `
@@ -109,6 +95,5 @@ exports.EMETAORDER = (obj, commit) => {
10995 const t = chalk . red ( 'EMETAORDER' )
11096 const lin = chalk . grey ( rpad ( `${ line ( obj ) } :0` , 6 ) )
11197 const i = getInfo ( 'EMETAORDER' )
112- const str = obj . str
11398 return ` ${ fail } ${ lin } ${ i } ${ t } `
11499}
0 commit comments