From bdfdae4abbcabf4b5dcb3c38a1d1a15d05b40a7f Mon Sep 17 00:00:00 2001 From: Chris Bracken Date: Thu, 20 Dec 2018 12:20:07 -0800 Subject: [PATCH] [License] Enable prefer_initializing_formals lint --- engine/src/flutter/tools/licenses/analysis_options.yaml | 1 + engine/src/flutter/tools/licenses/lib/licenses.dart | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/engine/src/flutter/tools/licenses/analysis_options.yaml b/engine/src/flutter/tools/licenses/analysis_options.yaml index 7eea061fd8..0e38392374 100644 --- a/engine/src/flutter/tools/licenses/analysis_options.yaml +++ b/engine/src/flutter/tools/licenses/analysis_options.yaml @@ -53,6 +53,7 @@ linter: - prefer_equal_for_default_values - prefer_final_fields - prefer_final_locals + - prefer_initializing_formals - prefer_is_not_empty - prefer_single_quotes - prefer_void_to_null diff --git a/engine/src/flutter/tools/licenses/lib/licenses.dart b/engine/src/flutter/tools/licenses/lib/licenses.dart index 448674722b..d23634c2ee 100644 --- a/engine/src/flutter/tools/licenses/lib/licenses.dart +++ b/engine/src/flutter/tools/licenses/lib/licenses.dart @@ -284,11 +284,10 @@ abstract class License implements Comparable { return _registry.putIfAbsent(body, () => License.fromBodyAndType(body, type, origin: origin)); } - License._(String body, this.type, { + License._(this.body, this.type, { this.origin, bool yesWeKnowWhatItLooksLikeButItIsNot = false - }) : body = body, - authors = _readAuthors(body), + }) : authors = _readAuthors(body), assert(_reformat(body) == body) { assert(() { try {