enable lint overridden_fields (#9527)
* enable lint overridden_fields * address review comment
This commit is contained in:
committed by
GitHub
parent
0d0861b3ee
commit
ad496e142b
@@ -86,7 +86,7 @@ linter:
|
||||
# - omit_local_variable_types # opposite of always_specify_types
|
||||
# - one_member_abstracts # too many false positives
|
||||
# - only_throw_errors # https://github.com/flutter/flutter/issues/5792
|
||||
# - overridden_fields # not yet tested
|
||||
- overridden_fields
|
||||
- package_api_docs
|
||||
- package_prefixed_library_names
|
||||
# - parameter_assignments # we do this commonly
|
||||
|
||||
@@ -84,7 +84,7 @@ linter:
|
||||
# - omit_local_variable_types # opposite of always_specify_types
|
||||
# - one_member_abstracts # too many false positives
|
||||
# - only_throw_errors # https://github.com/flutter/flutter/issues/5792
|
||||
# - overridden_fields # not yet tested
|
||||
- overridden_fields
|
||||
- package_api_docs
|
||||
- package_prefixed_library_names
|
||||
# - parameter_assignments # we do this commonly
|
||||
|
||||
@@ -105,7 +105,9 @@ class FlutterErrorDetails {
|
||||
|
||||
/// Converts the [exception] to a string.
|
||||
///
|
||||
/// This applies some additional logic to
|
||||
/// This applies some additional logic to make [AssertionError] exceptions
|
||||
/// prettier, to handle exceptions that stringify to empty strings, to handle
|
||||
/// objects that don't inherit from [Exception] or [Error], and so forth.
|
||||
String exceptionAsString() {
|
||||
String longMessage;
|
||||
if (exception is AssertionError) {
|
||||
@@ -151,7 +153,7 @@ class FlutterError extends AssertionError {
|
||||
/// Include as much detail as possible in the full error message,
|
||||
/// including specifics about the state of the app that might be
|
||||
/// relevant to debugging the error.
|
||||
FlutterError(this.message);
|
||||
FlutterError(String message) : super(message);
|
||||
|
||||
/// The message associated with this error.
|
||||
///
|
||||
@@ -169,7 +171,7 @@ class FlutterError extends AssertionError {
|
||||
/// All sentences in the error should be correctly punctuated (i.e.,
|
||||
/// do end the error message with a period).
|
||||
@override
|
||||
final String message;
|
||||
String get message => super.message;
|
||||
|
||||
@override
|
||||
String toString() => message;
|
||||
|
||||
Reference in New Issue
Block a user