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

Side by Side Diff: pkg/analyzer/lib/src/generated/error.dart

Issue 1863103002: Add an UNUSED_SHOWN_NAMES hint to the analyzer (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library analyzer.src.generated.error; 5 library analyzer.src.generated.error;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analyzer/dart/ast/ast.dart' show AstNode; 9 import 'package:analyzer/dart/ast/ast.dart' show AstNode;
10 import 'package:analyzer/dart/ast/token.dart'; 10 import 'package:analyzer/dart/ast/token.dart';
(...skipping 2688 matching lines...) Expand 10 before | Expand all | Expand 10 after
2699 HintCode.UNNECESSARY_CAST, 2699 HintCode.UNNECESSARY_CAST,
2700 HintCode.UNNECESSARY_NO_SUCH_METHOD, 2700 HintCode.UNNECESSARY_NO_SUCH_METHOD,
2701 HintCode.UNNECESSARY_TYPE_CHECK_FALSE, 2701 HintCode.UNNECESSARY_TYPE_CHECK_FALSE,
2702 HintCode.UNNECESSARY_TYPE_CHECK_TRUE, 2702 HintCode.UNNECESSARY_TYPE_CHECK_TRUE,
2703 HintCode.UNUSED_ELEMENT, 2703 HintCode.UNUSED_ELEMENT,
2704 HintCode.UNUSED_FIELD, 2704 HintCode.UNUSED_FIELD,
2705 HintCode.UNUSED_IMPORT, 2705 HintCode.UNUSED_IMPORT,
2706 HintCode.UNUSED_CATCH_CLAUSE, 2706 HintCode.UNUSED_CATCH_CLAUSE,
2707 HintCode.UNUSED_CATCH_STACK, 2707 HintCode.UNUSED_CATCH_STACK,
2708 HintCode.UNUSED_LOCAL_VARIABLE, 2708 HintCode.UNUSED_LOCAL_VARIABLE,
2709 HintCode.UNUSED_SHOWN_NAME,
2709 HintCode.USE_OF_VOID_RESULT, 2710 HintCode.USE_OF_VOID_RESULT,
2710 HintCode.FILE_IMPORT_INSIDE_LIB_REFERENCES_FILE_OUTSIDE, 2711 HintCode.FILE_IMPORT_INSIDE_LIB_REFERENCES_FILE_OUTSIDE,
2711 HintCode.FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE, 2712 HintCode.FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE,
2712 HintCode.PACKAGE_IMPORT_CONTAINS_DOT_DOT, 2713 HintCode.PACKAGE_IMPORT_CONTAINS_DOT_DOT,
2713 HtmlErrorCode.PARSE_ERROR, 2714 HtmlErrorCode.PARSE_ERROR,
2714 HtmlWarningCode.INVALID_URI, 2715 HtmlWarningCode.INVALID_URI,
2715 HtmlWarningCode.URI_DOES_NOT_EXIST, 2716 HtmlWarningCode.URI_DOES_NOT_EXIST,
2716 StaticTypeWarningCode.EXPECTED_ONE_LIST_TYPE_ARGUMENTS, 2717 StaticTypeWarningCode.EXPECTED_ONE_LIST_TYPE_ARGUMENTS,
2717 StaticTypeWarningCode.EXPECTED_TWO_MAP_TYPE_ARGUMENTS, 2718 StaticTypeWarningCode.EXPECTED_TWO_MAP_TYPE_ARGUMENTS,
2718 StaticTypeWarningCode.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE, 2719 StaticTypeWarningCode.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE,
(...skipping 1052 matching lines...) Expand 10 before | Expand all | Expand 10 after
3771 "The stack trace variable '{0}' is not used and can be removed"); 3772 "The stack trace variable '{0}' is not used and can be removed");
3772 3773
3773 /** 3774 /**
3774 * Unused local variables are local variables which are never read. 3775 * Unused local variables are local variables which are never read.
3775 */ 3776 */
3776 static const HintCode UNUSED_LOCAL_VARIABLE = const HintCode( 3777 static const HintCode UNUSED_LOCAL_VARIABLE = const HintCode(
3777 'UNUSED_LOCAL_VARIABLE', 3778 'UNUSED_LOCAL_VARIABLE',
3778 "The value of the local variable '{0}' is not used"); 3779 "The value of the local variable '{0}' is not used");
3779 3780
3780 /** 3781 /**
3782 * Unused shown names are names shown on imports which are never used.
3783 */
3784 static const HintCode UNUSED_SHOWN_NAME =
3785 const HintCode('UNUSED_SHOWN_NAME', "Unused name shown in import");
Brian Wilkerson 2016/04/06 15:17:40 The name should be included in the error message.
srawlins 2016/04/07 15:27:22 Done.
3786
3787 /**
3781 * Hint for cases where the source expects a method or function to return a 3788 * Hint for cases where the source expects a method or function to return a
3782 * non-void result, but the method or function signature returns void. 3789 * non-void result, but the method or function signature returns void.
3783 * 3790 *
3784 * Parameters: 3791 * Parameters:
3785 * 0: the name of the method or function that returns void 3792 * 0: the name of the method or function that returns void
3786 */ 3793 */
3787 static const HintCode USE_OF_VOID_RESULT = const HintCode( 3794 static const HintCode USE_OF_VOID_RESULT = const HintCode(
3788 'USE_OF_VOID_RESULT', 3795 'USE_OF_VOID_RESULT',
3789 "The result of '{0}' is being used, even though it is declared to be 'void '"); 3796 "The result of '{0}' is being used, even though it is declared to be 'void '");
3790 3797
(...skipping 1969 matching lines...) Expand 10 before | Expand all | Expand 10 after
5760 * Initialize a newly created error code to have the given [name]. 5767 * Initialize a newly created error code to have the given [name].
5761 */ 5768 */
5762 const TodoCode(String name) : super(name, "{0}"); 5769 const TodoCode(String name) : super(name, "{0}");
5763 5770
5764 @override 5771 @override
5765 ErrorSeverity get errorSeverity => ErrorSeverity.INFO; 5772 ErrorSeverity get errorSeverity => ErrorSeverity.INFO;
5766 5773
5767 @override 5774 @override
5768 ErrorType get type => ErrorType.TODO; 5775 ErrorType get type => ErrorType.TODO;
5769 } 5776 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/resolver.dart » ('j') | pkg/analyzer/lib/src/generated/resolver.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698