I want to create naming convention rule for member variable in inspection profile of IntelliJ. for example: if developer gives member variable name as "test" then it should complain using my custom inspection and suggests the naming should be "m_test".
How do I achieve it in IntelliJ? I checked in existing inspection profile and couldn't able to find any rule regarding this.
There is a built-in inspection for this; you don't need to write a new one. The inspection is under Java | Naming conventions | Instance field naming convention. You can specify the regular expression for the name in the "Pattern" field.