Inspectopedia 2024.3 Help

Method can be made 'static'

Reports a class method that can be safely made static. A method can be static if it does not reference any of its class' non-static methods and non-static fields and is not overridden in a subclass.

Locating this inspection

By ID

Can be used to locate inspection in e.g. Qodana configuration files, where you can quickly enable or disable it, or adjust its settings.

JSMethodCanBeStatic
Via Settings dialog

Path to the inspection settings via IntelliJ Platform IDE Settings dialog, when you need to adjust inspection settings directly from your IDE.

Settings or Preferences | Editor | Inspections | JavaScript and TypeScript | General

Use the first checkbox below to inspect only private methods.

Inspection options

Here you can find the description of settings available for the Method can be made 'static' inspection, and the reference of their default values.

Only check 'private' methods

Not selected

Last modified: 03 December 2024