Enforce user to enable authorization

I would need to enforce user to enable custom authorization annotation(@EnableAuthorization) when we scan our code in Java/Spring . Please advise if this can be done using Sonar or if any other feasibility to implement it.

Hello @sivamca.ram

If I understand correctly the situation, you are probably looking for Custom rules. Here is a link to a tutorial to understand what is it and how to use it: Custom rules 101.

Hope it helps,
Quentin