File tree 3 files changed +2
-31
lines changed
3 files changed +2
-31
lines changed Original file line number Diff line number Diff line change @@ -99,9 +99,7 @@ function lint(config){
99
99
unusedL10n . warn ( flow ) ;
100
100
}
101
101
102
- } ,
103
- function ( flow ) {
104
- flow . result = require ( './reporter/process-warns' ) ( flow , options ) ;
102
+ flow . result = require ( './reporter/process-warns' ) ( flow . warns , options . filter ) ;
105
103
}
106
104
] ) ;
107
105
Original file line number Diff line number Diff line change 1
- var isChildProcess = typeof process . send == 'function' ; // child process has send method
2
-
3
- module . exports = function ( flow , options ) {
1
+ module . exports = function ( warns , fileFilter ) {
4
2
var result = { } ;
5
- var warns = flow . warns ;
6
- var fileFilter = options . filter ;
7
3
8
4
warns . forEach ( function ( warn ) {
9
5
var filename = warn . file || '<UnknownFile>' ;
@@ -20,27 +16,5 @@ module.exports = function(flow, options){
20
16
} ) ;
21
17
} ) ;
22
18
23
- if ( ! isChildProcess )
24
- {
25
- if ( options . warnUnusedL10n && flow . usedL10nTokens )
26
- {
27
- var usedL10nTokensInfo = flow . usedL10nTokens ;
28
-
29
- for ( var dictFileName in usedL10nTokensInfo . items ) {
30
- var tokenNames = usedL10nTokensInfo . items [ dictFileName ] ;
31
-
32
- for ( var tokenName in tokenNames ) {
33
- if ( ! tokenNames [ tokenName ] ) {
34
- result [ dictFileName ] = result [ dictFileName ] || [ ] ;
35
- result [ dictFileName ] . push ( {
36
- loc : dictFileName ,
37
- message : tokenName
38
- } ) ;
39
- }
40
- }
41
- }
42
- }
43
- }
44
-
45
19
return result ;
46
20
} ;
Original file line number Diff line number Diff line change @@ -80,7 +80,6 @@ exports.warn = function(flow){
80
80
81
81
for ( var tokenName in tokenNames ) {
82
82
if ( ! tokenNames [ tokenName ] ) {
83
- dictFileName = dictFileName . slice ( process . cwd ( ) . length ) ;
84
83
flow . warn ( {
85
84
file : dictFileName ,
86
85
message : tokenName
You can’t perform that action at this time.
0 commit comments