Comments (3)
Thanks for your input. I agree that we can change things to make this easier, and I think your idea of having a normal input task is a good one, and would cover the bases. Now all we have to do is think of a good name: how about scalastyleTask
from scalastyle-sbt-plugin.
My comment saying that we "first call the compile task" is a bit misleading since we are not really calling it, sbt will figure out the order for us. There is also an unused scalastyleTask
argument which if it was used would not work since then the order is not defined. It works in this case but only because it calls doScalastyle
directly. This is all a little bit silly.
I went to the sbt docs to go and lookup Defining a sequential task with Def.sequential and low and behold the example is exactly what we want. Keeping in mind that it should be a "raw task" so that users can choose the configuration to use (for reference Provide raw settings and configured settings).
As for the name, that is a hard one. I would say that it should probably start with compile
. The most descriptive would be something like compileThenCheckStyle
.
In terms of completeness I would be inclined to do something like:
- Add a
val scalastyleDefaultArgs = Setting[Seq[String]]
for the default args which defaults toSeq.empty
- A non-input task that does something like
scalastyleWithDefaultArgs := scalastyle.toTask(scalastyleDefaultArgs.mkString(" ")).value
- A raw task for compiling and checking the style
compileThenCheckStyle := Def.sequential(compile, scalastyleWithDefaultArgs).value
If I remember this later I'll double check that it works and submit a PR.
from scalastyle-sbt-plugin.
@steinybot this would be really helpful!
from scalastyle-sbt-plugin.
Related Issues (20)
- Setting (scalastyleConfig in Test) inside an AutoPlugin doesn't work HOT 8
- scalastyleSources does not include all source directories HOT 13
- Incompatible with AutoPlugin HOT 1
- plugins.sbt in IntelliJ IDEA - plugin not found HOT 2
- generate scalastyle-reports.html from scalastyle-reports.xml HOT 3
- Array of magic numbers HOT 2
- scalastyleSources setting does not support individual files HOT 2
- Fail the build on warning HOT 3
- How to invoke scalastyle before testing?
- Next release? HOT 2
- Publish for sbt 1.0 HOT 2
- How to trigger it:scalastyle? HOT 3
- `scalaStyle` key no longer accessible from `ScalastylePlugin` object HOT 3
- How do I pass args to the Plugin? HOT 1
- non-zero exit code HOT 5
- Trailing commas lead to very confusing scalastyle errors HOT 2
- Fewer output messages
- ScalaStyle
- ImportOrderChecker grouping not working as expected
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scalastyle-sbt-plugin.