-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CPLAT-11722 Add uiForwardRef #612
Changes from 1 commit
a29da58
53fd919
968de33
c542033
841d102
117cadb
68f4700
96ba4ff
de94787
ea10a41
d435a1f
d865b24
378a58d
7d288eb
861fda7
fa6eb84
1de88bb
d66db3f
0e3f5ef
236f344
ac8a42c
9e3f6d3
e5001d2
8189f1c
49df84c
acf2582
af9e2e4
31b3414
b0f9877
d12bca5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
// ignore: deprecated_member_use | ||
import 'package:analyzer/analyzer.dart' | ||
show CompileTimeErrorCode, NodeLocator, StaticTypeWarningCode, StaticWarningCode; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The codes below were moved to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These don't exist in the lowest allowed version of the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ohh yep, thanks for catching that! |
||
show CompileTimeErrorCode, NodeLocator; | ||
import 'package:analyzer/dart/ast/ast.dart'; | ||
import 'package:over_react_analyzer_plugin/src/util/react_types.dart'; | ||
import 'package:analyzer_plugin/protocol/protocol_common.dart'; | ||
|
@@ -63,16 +63,16 @@ class MissingCascadeParensDiagnostic extends DiagnosticContributor { | |
computeErrors(result, collector) async { | ||
for (final error in result.errors) { | ||
final isBadFunction = const { | ||
StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION, | ||
StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION_EXPRESSION, | ||
CompileTimeErrorCode.INVOCATION_OF_NON_FUNCTION, | ||
CompileTimeErrorCode.INVOCATION_OF_NON_FUNCTION_EXPRESSION, | ||
}.contains(error.errorCode); | ||
final isBadArity = const { | ||
CompileTimeErrorCode.NOT_ENOUGH_POSITIONAL_ARGUMENTS, | ||
CompileTimeErrorCode.EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED, | ||
CompileTimeErrorCode.EXTRA_POSITIONAL_ARGUMENTS, | ||
}.contains(error.errorCode); | ||
final isVoidUsage = const { | ||
StaticWarningCode.USE_OF_VOID_RESULT, | ||
CompileTimeErrorCode.USE_OF_VOID_RESULT, | ||
}.contains(error.errorCode); | ||
|
||
if (isBadFunction || isBadArity || isVoidUsage) { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new analyzer version made improvements to the analysis of extensions and caught this was unused