-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add sbt.ConcurrentRestrictions.Tag("scalafmt") + Tags.CPU on scalafmt…
… tasks (#101) * add sbt.ConcurrentRestrictions.Tag("scalafmt") + Tags.CPU on scalafmt tasks * Scaladoc fixed Co-authored-by: Mikhail Chugunkov <[email protected]>
- Loading branch information
Showing
2 changed files
with
45 additions
and
11 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
plugin/src/main/scala/org/scalafmt/sbt/ConcurrentRestrictionTags.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package org.scalafmt.sbt | ||
|
||
trait ConcurrentRestrictionTags { | ||
import sbt.ConcurrentRestrictions.Tag | ||
|
||
/** | ||
* This tag can be used to control the maximum number of parallel scalafmt tasks in large-scale build trees. | ||
* | ||
* Global / concurrentRestrictions += Tags.limit(org.scalafmt.sbt.ConcurrentRestrictionTags.Scalafmt, 3) | ||
* | ||
* would prevent SBT from spawning more than three simultaneous Scalafmt tasks | ||
* | ||
* @see https://www.scala-sbt.org/1.x/docs/Parallel-Execution.html | ||
*/ | ||
val Scalafmt = Tag("scalafmt") | ||
} | ||
|
||
object ConcurrentRestrictionTags extends ConcurrentRestrictionTags |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters