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

Unified Diff: pkg/analyzer/lib/src/task/options.dart

Issue 2112073002: Option to enable analyzer trailing comma support (#26647). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Option to enable analyzer trailing comma support (#26647). Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/lib/src/task/dart.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/task/options.dart
diff --git a/pkg/analyzer/lib/src/task/options.dart b/pkg/analyzer/lib/src/task/options.dart
index 0f47c443d5cc1a7b51e50d40dd78a1ddd9028347..a25d146bc89f01e4317f8e229219eec1367c127f 100644
--- a/pkg/analyzer/lib/src/task/options.dart
+++ b/pkg/analyzer/lib/src/task/options.dart
@@ -47,6 +47,7 @@ class AnalyzerOptions {
static const String enableGenericMethods = 'enableGenericMethods';
static const String enableStrictCallChecks = 'enableStrictCallChecks';
static const String enableSuperMixins = 'enableSuperMixins';
+ static const String enableTrailingCommas = 'enableTrailingCommas';
/// This option is deprecated.
static const String enableConditionalDirectives =
@@ -488,6 +489,14 @@ class _OptionsProcessor {
context.analysisOptions = options;
}
}
+ if (feature == AnalyzerOptions.enableTrailingCommas) {
+ if (isTrue(value)) {
+ AnalysisOptionsImpl options =
+ new AnalysisOptionsImpl.from(context.analysisOptions);
+ options.enableTrailingCommas = true;
+ context.analysisOptions = options;
+ }
+ }
if (feature == AnalyzerOptions.enableGenericMethods) {
if (isTrue(value)) {
AnalysisOptionsImpl options =
« no previous file with comments | « pkg/analyzer/lib/src/task/dart.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698