Add a code inspection for @AuraEnabled on non-static method
Issue #1220
resolved
IC should mark the following as an error:
@AuraEnabled
public void doSomething() {
...
}
because the method is annotated as @AuraEnabled
but is not static
.
There should be a corresponding code intention to add the static
modifier to the method (and perhaps another to remove the @AuraEnabled
annotation, but only if no references are found in Lightning).
Comments (3)
-
-
reporter Ah, good to know. Thanks for the info, Jonny!
-
reporter - changed status to resolved
Delivered with 2.1.0.2 along with a large number of related static code analysis enhancements.
- Log in to comment
This is sometimes valid for instance method getters being returned from controller methods