Skip to content

Commit

Permalink
enable lint overridden_fields (flutter#9527)
Browse files Browse the repository at this point in the history
* enable lint overridden_fields

* address review comment
  • Loading branch information
a14n committed Apr 22, 2017
1 parent 0d0861b commit ad496e1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .analysis_options
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .analysis_options_repo
Expand Up @@ -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
Expand Down
8 changes: 5 additions & 3 deletions packages/flutter/lib/src/foundation/assertions.dart
Expand Up @@ -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) {
Expand Down Expand Up @@ -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.
///
Expand All @@ -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;
Expand Down

0 comments on commit ad496e1

Please sign in to comment.