In our projects we generally create a custom variant for the code inspectors, which take cares of our project related Naming convention and coding standard.
If you are new in creating Code inspector variant you can refer below link.
In general whenever we develop any object or make any changes in any object, we go to Transaction SCII and run the code inspector for Z created Variant instead of directly checking it from Object menu Class/Program/Function module etc. ->Check -> code inspector.
Reason for the same is our Z created variant is not set as Default.
Once it is set as Default then you can use from object menu also.
Please follow below process to set the Z variant as default variant.
Go to T-code – SCI
In Check variant write Z variant and then click on button on left side of Check variant and this will turn to making it global as generally Variant which we create is global.(If it is created as Local keep it as it is)
Now go to your program and run Code inspector
You will now be able to able to see naming convention error and other project specific norm related error.
Note: When ever any alteration is been made in Z Variant we again have to assign it to our ID