How to override the location of the configuration file - scalastyle-result.xml

470 views
Skip to first unread message

Do Ngoc Hoan

unread,
Nov 13, 2013, 10:50:38 AM11/13/13
to scalasty...@googlegroups.com
Greeting,

When using sbt plugin, the default location of scalastyle-result.xml is './scalastyle-config.xml'

I would like to put the configuration file in a different folder and specify the path when running, something like this:
'sbt scalastyle scalastyle-config=project/scalastyle-config.xml'

or any other ways would be fine. But all didn't work for me.

I tried to figure out how to override the path to the configuration file in here:

But I couldn't. Do you have any idea? 

Thank you very much,
Hoan

Matthew Farwell

unread,
Nov 13, 2013, 10:53:13 AM11/13/13
to scalasty...@googlegroups.com
One option is to put the following in your build.sbt:

org.scalastyle.sbt.PluginKeys.config := file("alternative-config.xml")

Have fun,

Matthew Farwell.


2013/11/13 Do Ngoc Hoan <ngocho...@gmail.com>

--
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, adressez un e-mail à scalasty...@googlegroups.com.
Visitez ce groupe à l'adresse http://groups.google.com/group/scalastyle-users .
Pour plus d'options, visitez le site https://groups.google.com/groups/opt_out .

Do Ngoc Hoan

unread,
Nov 13, 2013, 11:09:58 AM11/13/13
to scalasty...@googlegroups.com
Thank a lot, it works perfectly.
Reply all
Reply to author
Forward
0 new messages