Reputation: 4296
How do I turn off this warning? I like most of the Intellij warnings but not this one.
method with accessor like name is empty-paren
Upvotes: 2
Views: 4614
Reputation: 1
Intellij inspections seem to assume that any method starting with get
, is
, or to
are accessors and any method starting with set
or update
are mutators. If you don't want to outright disable the inspection, you can just avoid using these specific verbs.
Otherwise, see Micho's answer to disable it.
Note: I would add this as a comment on the existing chosen answer but I don't yet have the karma for that.
Upvotes: 0
Reputation: 10959
Multiple options: (first is in general for any Intellij setting and will save you so much time)
Upvotes: 1
Reputation: 3963
This inspection is warning you the method is not following the recommended convention to use parameterless methods whenever there are no parameters and the method have no side effects.
To disable it in IntelliJ IDEA, go to: Settings... -> Editor -> Code Style -> Inspections -> Scala -> Method Signature and uncheck Method with accessor-like name is empty paren
Upvotes: 6