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

Side by Side Diff: bin/edit_files.dart

Issue 1239803005: fix issues caught by analysis_server (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 5 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
« no previous file with comments | « no previous file | lib/runtime/messages_widget.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env dart 1 #!/usr/bin/env dart
2 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 2 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
3 // for details. All rights reserved. Use of this source code is governed by a 3 // for details. All rights reserved. Use of this source code is governed by a
4 // BSD-style license that can be found in the LICENSE file. 4 // BSD-style license that can be found in the LICENSE file.
5 5
6 /// Command line tool to write checker errors as inline comments in the source 6 /// Command line tool to write checker errors as inline comments in the source
7 /// code of the program. This tool requires the info.json file created by 7 /// code of the program. This tool requires the info.json file created by
8 /// running devc.dart passing the arguments 8 /// running devc.dart passing the arguments
9 /// --dump-info --dump-info-file info.json 9 /// --dump-info --dump-info-file info.json
10 10
11 library dev_compiler.bin.edit_files; 11 library dev_compiler.bin.edit_files;
12 12
13 import 'dart:io'; 13 import 'dart:io';
14 import 'dart:convert'; 14 import 'dart:convert';
15 15
16 import 'package:analyzer/src/generated/engine.dart' show AnalysisContext; 16 import 'package:analyzer/src/generated/engine.dart' show AnalysisContext;
17 import 'package:analyzer/src/generated/source.dart' show Source; 17 import 'package:analyzer/src/generated/source.dart' show Source;
18 import 'package:args/args.dart'; 18 import 'package:args/args.dart';
19 import 'package:cli_util/cli_util.dart' show getSdkDir; 19 import 'package:cli_util/cli_util.dart' show getSdkDir;
20 import 'package:source_maps/refactor.dart'; 20 import 'package:source_maps/refactor.dart';
21 import 'package:source_span/source_span.dart'; 21 import 'package:source_span/source_span.dart';
22 22
23 import 'package:dev_compiler/src/analysis_context.dart'; 23 import 'package:dev_compiler/src/analysis_context.dart';
24 import 'package:dev_compiler/src/options.dart'; 24 import 'package:dev_compiler/src/options.dart';
25 import 'package:dev_compiler/src/summary.dart'; 25 import 'package:dev_compiler/src/summary.dart';
26 import 'package:dev_compiler/strong_mode.dart';
26 27
27 final ArgParser argParser = new ArgParser() 28 final ArgParser argParser = new ArgParser()
28 ..addOption('level', help: 'Minimum error level', defaultsTo: "info") 29 ..addOption('level', help: 'Minimum error level', defaultsTo: "info")
29 ..addOption('checkout-files-executable', 30 ..addOption('checkout-files-executable',
30 help: 'Executable to check out files from source control (e.g. svn)', 31 help: 'Executable to check out files from source control (e.g. svn)',
31 defaultsTo: null) 32 defaultsTo: null)
32 ..addOption('checkout-files-arg', 33 ..addOption('checkout-files-arg',
33 help: 'Arg to check out files from source control (e.g. checkout)', 34 help: 'Arg to check out files from source control (e.g. checkout)',
34 defaultsTo: null) 35 defaultsTo: null)
35 ..addOption('include-pattern', 36 ..addOption('include-pattern',
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 : null; 152 : null;
152 153
153 var context = 154 var context =
154 createAnalysisContextWithSources(new StrongModeOptions(), options); 155 createAnalysisContextWithSources(new StrongModeOptions(), options);
155 var visitor = new EditFileSummaryVisitor(context, args['level'], 156 var visitor = new EditFileSummaryVisitor(context, args['level'],
156 args['checkout-files-executable'], args['checkout-files-arg'], 157 args['checkout-files-executable'], args['checkout-files-arg'],
157 includePattern, excludePattern); 158 includePattern, excludePattern);
158 summary.accept(visitor); 159 summary.accept(visitor);
159 visitor.build(); 160 visitor.build();
160 } 161 }
OLDNEW
« no previous file with comments | « no previous file | lib/runtime/messages_widget.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698