The Kotlin guide on coding conventions says factory functions may start with an uppercase letter,
Exception: factory functions used to create instances of classes can have the same name as the class being created:abstract class Foo { ... } class FooImpl : Foo { ... } fun Foo(): Foo { return FooImpl(...) }
The code inspector in android studio did not get the memo, however; it complains about the upcase letter. I realize I can go into settings and modify the rule, but (1) I don't want to make that global change, and (2) I don't want other people using my code to get the warning. I just wish to suppress the warning coming from this one line with a @Suppress directive (or some other way).
And I can't seem to find a list of all @Suppress directives -- where is it?
And where do I file a bug report for this?
To suppress any warning in Kotlin, press Alt-Enter, then the right arrow key and select the suppress action from the context menu, as shown on the attached screenshot.
The issue for this problem has already been filed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With