-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
devexp-linterIssues with the analyzer's support for the linter packageIssues with the analyzer's support for the linter packagelegacy-area-analyzerUse area-devexp instead.Use area-devexp instead.
Description
Hello,
I would like to request a lint rule to avoid bang operator usage,
For ex:
String? a;
String b = a!; // Should not be allowed
Developer should be forced to use,
String b = a ?? "default";
They can also create a scoped extension like kotlin for complex cases like,
extension ObjectExt<T> on T {
R let<R>(R Function(T item) op) => op(this);
}
String b = a?.let((item) => "Hello $a") ?? "Hello Default";
Thank you
Turskyi
Metadata
Metadata
Assignees
Labels
devexp-linterIssues with the analyzer's support for the linter packageIssues with the analyzer's support for the linter packagelegacy-area-analyzerUse area-devexp instead.Use area-devexp instead.