Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Side by Side Diff: pkg/polymer/lib/src/build/linter.dart

Issue 543963002: Link to stable-errors site from pub-build messages on the command line. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /// Logic to validate that developers are correctly using Polymer constructs. 5 /// Logic to validate that developers are correctly using Polymer constructs.
6 /// This is mainly used to produce warnings for feedback in the editor. 6 /// This is mainly used to produce warnings for feedback in the editor.
7 library polymer.src.build.linter; 7 library polymer.src.build.linter;
8 8
9 import 'dart:async'; 9 import 'dart:async';
10 import 'dart:convert'; 10 import 'dart:convert';
(...skipping 23 matching lines...) Expand all
34 34
35 Future apply(Transform transform) { 35 Future apply(Transform transform) {
36 var seen = new Set<AssetId>(); 36 var seen = new Set<AssetId>();
37 var primary = transform.primaryInput; 37 var primary = transform.primaryInput;
38 var id = primary.id; 38 var id = primary.id;
39 transform.addOutput(primary); // this phase is analysis only 39 transform.addOutput(primary); // this phase is analysis only
40 seen.add(id); 40 seen.add(id);
41 bool isEntryPoint = options.isHtmlEntryPoint(id); 41 bool isEntryPoint = options.isHtmlEntryPoint(id);
42 42
43 var logger = new BuildLogger(transform, 43 var logger = new BuildLogger(transform,
44 convertErrorsToWarnings: !options.releaseMode); 44 convertErrorsToWarnings: !options.releaseMode,
45 detailsUri: 'http://goo.gl/5HPeuP');
45 46
46 return readPrimaryAsHtml(transform, logger).then((document) { 47 return readPrimaryAsHtml(transform, logger).then((document) {
47 return _collectElements(document, id, transform, logger, seen) 48 return _collectElements(document, id, transform, logger, seen)
48 .then((elements) { 49 .then((elements) {
49 new _LinterVisitor(id, logger, elements, isEntryPoint).run(document); 50 new _LinterVisitor(id, logger, elements, isEntryPoint).run(document);
50 51
51 // Write out the logs collected by our [BuildLogger]. 52 // Write out the logs collected by our [BuildLogger].
52 if (options.injectBuildLogsInOutput && logger is BuildLogger) { 53 if (options.injectBuildLogsInOutput && logger is BuildLogger) {
53 return (logger as BuildLogger).writeOutput(); 54 return (logger as BuildLogger).writeOutput();
54 } 55 }
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 } else if (segments.length > 2) { 436 } else if (segments.length > 2) {
436 // web/a/foo.html => ../packages/ 437 // web/a/foo.html => ../packages/
437 upDirCount = segments.length - 2; 438 upDirCount = segments.length - 2;
438 } 439 }
439 var reachOutPrefix = '../' * upDirCount; 440 var reachOutPrefix = '../' * upDirCount;
440 return USE_POLYMER_HTML.create({'reachOutPrefix': reachOutPrefix}); 441 return USE_POLYMER_HTML.create({'reachOutPrefix': reachOutPrefix});
441 } 442 }
442 443
443 const List<String> INTERNALLY_DEFINED_ELEMENTS = 444 const List<String> INTERNALLY_DEFINED_ELEMENTS =
444 const ['auto-binding-dart', 'polymer-element']; 445 const ['auto-binding-dart', 'polymer-element'];
OLDNEW
« no previous file with comments | « pkg/polymer/lib/src/build/import_inliner.dart ('k') | pkg/polymer/lib/src/build/log_injector.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698