Need to exclude a directory in my Project for one Rule

33 views
Skip to first unread message

Akshay Ambu

unread,
May 3, 2019, 6:46:10 AM5/3/19
to Scalastyle users
Hi,
I need to exclude a directory in my Project for the MagicNumber Rule.
I dont want scalastyle to run this rule for just my Test directory.
Is there a way to do this?

S SATHISH BABU

unread,
May 3, 2019, 7:13:21 AM5/3/19
to scalasty...@googlegroups.com
Hello,

You can suppress scalastyle for a section of code by using the following comment

// scalastyle:off
< you section of code >
// scalastyle:on

You can suppress a specific scalastyle rule too.

// scalastyle:off magic.numer
< you section of code >
// scalstyle:on magic.number


Regards,
S Sathish Babu

--
Vous recevez ce message, car vous êtes abonné au groupe Google Groupes "Scalastyle users".
Pour vous désabonner de ce groupe et ne plus recevoir d'e-mails le concernant, envoyez un e-mail à l'adresse scalastyle-use...@googlegroups.com.
Pour envoyer un message à ce groupe, envoyez un e-mail à l'adresse scalasty...@googlegroups.com.
Visitez ce groupe à l'adresse https://groups.google.com/group/scalastyle-users.
Pour obtenir davantage d'options, consultez la page https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages