Closed
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