Avoid private[this] in test build files (#8839)

This commit is contained in:
kenji yoshida 2026-03-01 15:46:56 +09:00 committed by GitHub
parent 7b5481ec3c
commit 870e526a00
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 6 deletions

View File

@ -3,8 +3,8 @@ import sbt._
import sbt.internal.util.complete.Parser._
object Build {
private[this] var string: String = ""
private[this] val stringFile = file("string.txt")
private var string: String = ""
private val stringFile = file("string.txt")
val setStringValue = inputKey[Unit]("set a global string to a value")
val checkStringValue = inputKey[Unit]("check the value of a global")
val taskThatFails = taskKey[Unit]("this should fail")

View File

@ -62,8 +62,8 @@ object Q extends AutoPlugin {
Nil
// used to ensure the build-level and global settings are only added once
private[this] val buildCount = new AInt(0)
private[this] val globalCount = new AInt(0)
private val buildCount = new AInt(0)
private val globalCount = new AInt(0)
}
object R extends AutoPlugin {

View File

@ -22,6 +22,6 @@ object A extends AutoPlugin {
}
// used to ensure the build-level and global settings are only added once
private[this] val buildCount = new AtomicInteger(0)
private[this] val globalCount = new AtomicInteger(0)
private val buildCount = new AtomicInteger(0)
private val globalCount = new AtomicInteger(0)
}