@@ -12,9 +12,10 @@ module.exports = function(gulp, plugins, config) {
1212 return util . forEachSubDirSequential (
1313 config . dest ,
1414 function ( dir ) {
15- var srcFiles = [ ] . slice . call ( glob . sync ( '{/lib,/ web} /**/*.dart' , {
15+ var srcFiles = [ ] . slice . call ( glob . sync ( 'web/**/*.dart' , {
1616 cwd : dir
1717 } ) ) ;
18+
1819 var testFiles = [ ] . slice . call ( glob . sync ( 'test/**/*_spec.dart' , {
1920 cwd : dir
2021 } ) ) ;
@@ -32,8 +33,17 @@ module.exports = function(gulp, plugins, config) {
3233 ) ;
3334
3435 function analyze ( dirName , done ) {
36+ // analyze files in lib directly – or you mess up package: urls
37+ var sources = [ ] . slice . call ( glob . sync ( 'lib/*.dart' , {
38+ cwd : dirName
39+ } ) ) ;
40+
41+ sources . push ( tempFile ) ;
42+
3543 //TODO remove --package-warnings once dartanalyzer handles transitive libraries
36- var stream = spawn ( config . command , [ '--fatal-warnings' , '--package-warnings' , tempFile ] , {
44+ var args = [ '--fatal-warnings' , '--package-warnings' ] . concat ( sources ) ;
45+
46+ var stream = spawn ( config . command , args , {
3747 // inherit stdin and stderr, but filter stdout
3848 stdio : [ process . stdin , 'pipe' , process . stderr ] ,
3949 cwd : dirName
@@ -60,21 +70,26 @@ module.exports = function(gulp, plugins, config) {
6070 if ( line . match ( / _ a n a l y z e r \. d a r t / ) ) {
6171 return ;
6272 }
73+ }
6374
64- //TODO: remove this work-around once #704 is fixed
65- if ( line . match ( / \/ t e s t \/ c o r e \/ c o m p i l e r \/ v i e w _ .* s p e c \. d a r t / ) ) {
66- return ;
67- }
68- if ( line . match ( / \/ t e s t _ l i b _ s p e c \. d a r t / ) ) {
69- return ;
70- }
75+ var skip = false ;
76+ // TODO: not reporting issues in web for now
77+ // Should be removed when https://github.com/angular/angular/issues/1392
78+ // is fixed
79+ var webDir = path . join ( dirName , 'web' ) ;
80+ if ( line . indexOf ( webDir ) >= 0 ) {
81+ skip = true ;
82+ line = '(TODO #1392) ' + line ;
7183 }
72- if ( line . match ( / \[ h i n t \] / ) ) {
73- hintCount ++ ;
74- } else if ( line . match ( / \[ w a r n i n g \] / ) ) {
75- warningCount ++ ;
76- } else {
77- errorCount ++ ;
84+
85+ if ( ! skip ) {
86+ if ( line . match ( / \[ h i n t \] / ) ) {
87+ hintCount ++ ;
88+ } else if ( line . match ( / \[ w a r n i n g \] / ) ) {
89+ warningCount ++ ;
90+ } else {
91+ errorCount ++ ;
92+ }
7893 }
7994 console . log ( dirName + ':' + line ) ;
8095 } ) ;
0 commit comments