mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 00:13:50 +00:00
Remove and hide analyzer cli flags.
BUG= R=brianwilkerson@google.com Review-Url: https://codereview.chromium.org/2713723003 .
This commit is contained in:
parent
30da80fb17
commit
1da570c215
|
@ -160,7 +160,7 @@ void defineAnalysisArguments(ArgParser parser, {bool hide: true, ddc: false}) {
|
|||
hide: hide);
|
||||
parser.addOption(packagesOption,
|
||||
help: 'The path to the package resolution configuration file, which '
|
||||
'supplies a mapping of package names to paths. This option cannot be '
|
||||
'supplies a mapping of package names\nto paths. This option cannot be '
|
||||
'used with --package-root.',
|
||||
hide: ddc);
|
||||
parser.addOption(sdkSummaryPathOption,
|
||||
|
|
|
@ -63,8 +63,8 @@ The following are advanced options to use with dartanalyzer:
|
|||
Produce output in a format suitable for parsing.
|
||||
|
||||
* `--url-mapping=libraryUri,/path/to/library.dart`<br>
|
||||
Tells the analyzer to use the specified library as the source
|
||||
for that particular import.
|
||||
Tells the analyzer to use the specified library as the source for that
|
||||
particular import.
|
||||
|
||||
The following options are deprecated:
|
||||
|
||||
|
@ -72,9 +72,3 @@ The following options are deprecated:
|
|||
**Deprecated.** Specify the directory to search for any libraries that are
|
||||
imported using `package:`. _This option is replaced as of Dart 1.12 with
|
||||
`--packages`._
|
||||
|
||||
* `--show-package-warnings`<br>
|
||||
**Deprecated.** Replaced by `--package-warnings`.
|
||||
|
||||
* `--show-sdk-warnings`<br>
|
||||
**Deprecated.** Replaced by `--warnings`.
|
||||
|
|
|
@ -172,7 +172,7 @@ class CommandLineOptions {
|
|||
args['package-warnings'] ||
|
||||
args['x-package-warnings-prefix'] != null,
|
||||
showPackageWarningsPrefix = args['x-package-warnings-prefix'],
|
||||
showSdkWarnings = args['show-sdk-warnings'] || args['warnings'],
|
||||
showSdkWarnings = args['sdk-warnings'],
|
||||
sourceFiles = args.rest,
|
||||
warningsAreFatal = args['fatal-warnings'],
|
||||
strongMode = args['strong'],
|
||||
|
@ -315,18 +315,6 @@ class CommandLineOptions {
|
|||
help: 'Show warnings from package: imports.',
|
||||
defaultsTo: false,
|
||||
negatable: false)
|
||||
..addFlag('show-package-warnings',
|
||||
help: 'Show warnings from package: imports (deprecated).',
|
||||
defaultsTo: false,
|
||||
negatable: false)
|
||||
..addFlag('warnings',
|
||||
help: 'Show warnings from SDK imports.',
|
||||
defaultsTo: false,
|
||||
negatable: false)
|
||||
..addFlag('show-sdk-warnings',
|
||||
help: 'Show warnings from SDK imports (deprecated).',
|
||||
defaultsTo: false,
|
||||
negatable: false)
|
||||
..addFlag('help',
|
||||
abbr: 'h',
|
||||
help:
|
||||
|
@ -419,6 +407,16 @@ class CommandLineOptions {
|
|||
defaultsTo: false,
|
||||
negatable: false,
|
||||
hide: hide)
|
||||
..addFlag('show-package-warnings',
|
||||
help: 'Show warnings from package: imports (deprecated).',
|
||||
defaultsTo: false,
|
||||
negatable: false,
|
||||
hide: hide)
|
||||
..addFlag('sdk-warnings',
|
||||
help: 'Show warnings from SDK imports.',
|
||||
defaultsTo: false,
|
||||
negatable: false,
|
||||
hide: hide)
|
||||
..addFlag('log',
|
||||
help: 'Log additional messages and exceptions.',
|
||||
defaultsTo: false,
|
||||
|
|
|
@ -134,7 +134,7 @@ main() {
|
|||
|
||||
test('sdk warnings', () {
|
||||
CommandLineOptions options = CommandLineOptions
|
||||
.parse(['--dart-sdk', '.', '--warnings', 'foo.dart']);
|
||||
.parse(['--dart-sdk', '.', '--sdk-warnings', 'foo.dart']);
|
||||
expect(options.showSdkWarnings, isTrue);
|
||||
});
|
||||
|
||||
|
|
|
@ -1878,8 +1878,7 @@ class AnalyzeLibraryTestSuite extends DartcCompilationTestSuite {
|
|||
|
||||
List<String> additionalOptions(Path filePath, {bool showSdkWarnings}) {
|
||||
var options = super.additionalOptions(filePath);
|
||||
// NOTE: This flag has been deprecated.
|
||||
options.add('--show-sdk-warnings');
|
||||
options.add('--sdk-warnings');
|
||||
return options;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue