No files processed in sbt scalastyle

115 views
Skip to first unread message

Thomas Nelson

unread,
Dec 11, 2014, 5:11:29 PM12/11/14
to scalasty...@googlegroups.com
I have a scala project using sbt 0.13.5, and in project/plugins.sbt I have

addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "0.6.0")

resolvers += "sonatype-releases" at "https://oss.sonatype.org/content/repositories/releases/"

sbt scalastyleGenerateConfig  seems to work and generates an xml file, but then

$ sbt scalastyle
[info] Loading project definition from /Users/thn/Projects/Big/octopi/project
[info] Set current project to OCTOPI (in build file:/Users/thn/Projects/Big/octopi/)
[info] scalastyle using config /Users/thn/Projects/Big/octopi/scalastyle-config.xml
[info] Processed 0 file(s)
[info] Found 0 errors
[info] Found 0 warnings
[info] Found 0 infos
[info] Finished in 8 ms
[success] created output: /Users/thn/Projects/Big/octopi/target
[success] Total time: 0 s, completed Dec 11, 2014 3:02:35 PM

Is there some setting somewhere that I have to use to get it to find my sources?  Any idea where I should start in debugging this?

Thank you,
Thomas

Matthew Farwell

unread,
Dec 14, 2014, 2:42:37 PM12/14/14
to scalasty...@googlegroups.com
Hi,

It is hard to tell without a project. Could you provide a link to a project which has the problem?

Thanks.

Matthew Farwell.

--
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 http://groups.google.com/group/scalastyle-users.
Pour obtenir davantage d'options, consultez la page https://groups.google.com/d/optout.

Thomas Nelson

unread,
Dec 27, 2014, 12:25:37 PM12/27/14
to scalasty...@googlegroups.com
I've made a very simple "hello world" project with just one file, it says "0 files processed" as described above:


I am new to sbt so there may be something obvious I'm missing. 

Thanks,
Thomas

Matthew Farwell

unread,
Dec 28, 2014, 4:15:05 AM12/28/14
to scalasty...@googlegroups.com
Hi,

The reason that scalastyle isn't picking up your sources is that they are in the top level - it is expecting them to be in src/main/scala. The easiest option for you to get scalastyle working is to move them to the 'normal' directory src/main/scala.

If you really want to keep stuff in the base directory, we'll have to have a PR to take the sbt setting sourcesInBase into account. If the value is true, then we use baseDirectory rather than sourceDirectory for scalastyle.

Have fun,

Matthew Farwell.

Thomas Nelson

unread,
Dec 29, 2014, 11:56:55 AM12/29/14
to scalasty...@googlegroups.com
Thanks, I thought it might be something obvious!

Thomas

Vous recevez ce message, car vous êtes abonné à un sujet dans le groupe Google Groupes "Scalastyle users".
Pour vous désabonner de ce sujet, visitez le site https://groups.google.com/d/topic/scalastyle-users/T7KdDKufI98/unsubscribe.
Pour vous désabonner de ce groupe et de tous ses sujets, envoyez un e-mail à l'adresse scalastyle-use...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages