So the problem is solved. I have tried the solution proposed by Thomas Jansen in this question.
But I will give more information on how to do it.
In order to give different checkstyle modules to different sourcesets you need to define id tag in the module. Shown below:
<module name="ConstantName">
<property name="id" value="ConstantNameMain"/>
<property name="severity" value="error"/>
<property name="applyToPrivate" value="false"/>
<property name="format" value="^[A-Z][A-Za-z0-9]*(_[A-Za-z0-9]+)*$"/>
</module>
<module name="ConstantName">
<property name="id" value="ConstantNameTest"/>
<property name="severity" value="error"/>
<property name="applyToPrivate" value="false"/>
<property name="format" value="^[A-Z][A-Za-z0-9]*(_[A-Z0-9]+)*$"/>
</module>
Then we define SuppressionFilter module for suppression.xml which can be located at the same folder with your checkstyle.xml. One important thing is to locate the SuppressionFilter module as Checker module.
<module name="Checker">
<property name="severity" value="warning"/>
<module name="SuppressionFilter">
<property name="file" value="./suppressions.xml"/>
</module>
<module name="TreeWalker">
.
.
.
</module>
</module>
Then, we define the suppression.xml file as below:
<suppressions>
<!-- >Test sources suppressions</!-->
<suppress files="[\\/]src[\\/]test[\\/].*" id="ConstantNameMain" />
<!-- >Main sources suppressions</!-->
<suppress files="[\\/]src[\\/]main[\\/].*" id="ConstantNameTest" />
</suppressions>
Aaaaaand lastly, configure your Checkstyle-IDEA plugin, activate real time scan from Settings>Editor>Inspections>Checkstyle and you are done.