Skip to content

Commit 7179aee

Browse files
committed
Merge branch 'feature-add-link-to-autofix-on-words-deprecations' of https://github.com/scalatest/scalatest into 3.1.x
2 parents 6759295 + c201dd7 commit 7179aee

File tree

5 files changed

+276
-92
lines changed

5 files changed

+276
-92
lines changed

scalatest/src/main/scala/org/scalatest/featurespec/AnyFeatureSpecLike.scala

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,10 @@ trait AnyFeatureSpecLike extends TestSuite with TestRegistration with Informing
111111
*
112112
* This method has been renamed for consistency with ScalaTest's `Given`, `When`, and `Then` methods, which were changed to uppper case
113113
* when Scala deprecated `then` as an identifier, and Cucumber, one of the main original inspirations for `FeatureSpec`.
114+
*
115+
* <p>This can be rewritten automatically with autofix: <a href="https://github.com/scalatest/autofix/tree/master/3.1.x">https://github.com/scalatest/autofix/tree/master/3.1.x</a>.</p>
114116
*/
115-
@deprecated("The scenario (starting with lowercase 's') method has been deprecated and will be removed in a future version of ScalaTest. Please use Scenario (starting with an uppercase 'S') instead.", "3.1.0")
117+
@deprecated("The scenario (starting with lowercase 's') method has been deprecated and will be removed in a future version of ScalaTest. Please use Scenario (starting with an uppercase 'S') instead. This can be rewritten automatically with autofix: https://github.com/scalatest/autofix/tree/master/3.1.x", "3.1.0")
116118
protected def scenario(specText: String, testTags: Tag*)(testFun: => Any /* Assertion */)(implicit pos: source.Position): Unit =
117119
Scenario(specText, testTags: _*)(testFun)(pos)
118120

@@ -177,8 +179,10 @@ trait AnyFeatureSpecLike extends TestSuite with TestRegistration with Informing
177179
*
178180
* This method has been renamed for consistency with ScalaTest's `Given`, `When`, and `Then` methods, which were changed to uppper case
179181
* when Scala deprecated `then` as an identifier, and Cucumber, one of the main original inspirations for `FeatureSpec`.
182+
*
183+
* <p>This can be rewritten automatically with autofix: <a href="https://github.com/scalatest/autofix/tree/master/3.1.x">https://github.com/scalatest/autofix/tree/master/3.1.x</a>.</p>
180184
*/
181-
@deprecated("The feature (starting with lowercase 'f') method has been deprecated and will be removed in a future version of ScalaTest. Please use Feature (starting with an uppercase 'F') instead.", "3.1.0")
185+
@deprecated("The feature (starting with lowercase 'f') method has been deprecated and will be removed in a future version of ScalaTest. Please use Feature (starting with an uppercase 'F') instead. This can be rewritten automatically with autofix: https://github.com/scalatest/autofix/tree/master/3.1.x", "3.1.0")
182186
protected def feature(description: String)(fun: => Unit)(implicit pos: source.Position): Unit = Feature(description)(fun)(pos)
183187

184188
/**
@@ -368,8 +372,10 @@ trait AnyFeatureSpecLike extends TestSuite with TestRegistration with Informing
368372
*
369373
* This method has been renamed for consistency with ScalaTest's `Given`, `When`, and `Then` methods, which were changed to uppper case
370374
* when Scala deprecated `then` as an identifier, and Cucumber, one of the main original inspirations for `FeatureSpec`.
375+
*
376+
* <p>This can be rewritten automatically with autofix: <a href="https://github.com/scalatest/autofix/tree/master/3.1.x">https://github.com/scalatest/autofix/tree/master/3.1.x</a>.</p>
371377
*/
372-
@deprecated("The scenariosFor (starting with lowercase 's') method has been deprecated and will be removed in a future version of ScalaTest. Please use ScenariosFor (starting with an uppercase 'S') instead.", "3.1.0")
378+
@deprecated("The scenariosFor (starting with lowercase 's') method has been deprecated and will be removed in a future version of ScalaTest. Please use ScenariosFor (starting with an uppercase 'S') instead. This can be rewritten automatically with autofix: https://github.com/scalatest/autofix/tree/master/3.1.x", "3.1.0")
373379
protected def scenariosFor(unit: Unit): Unit = ScenariosFor(unit)
374380

375381
/**

scalatest/src/main/scala/org/scalatest/featurespec/AsyncFeatureSpecLike.scala

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,10 @@ trait AsyncFeatureSpecLike extends AsyncTestSuite with AsyncTestRegistration wit
111111
*
112112
* This method has been renamed for consistency with ScalaTest's `Given`, `When`, and `Then` methods, which were changed to uppper case
113113
* when Scala deprecated `then` as an identifier, and Cucumber, one of the main original inspirations for `FeatureSpec`.
114+
*
115+
* <p>This can be rewritten automatically with autofix: <a href="https://github.com/scalatest/autofix/tree/master/3.1.x">https://github.com/scalatest/autofix/tree/master/3.1.x</a>.</p>
114116
*/
115-
@deprecated("The scenario (starting with lowercase 's') method has been deprecated and will be removed in a future version of ScalaTest. Please use Scenario (starting with an uppercase 'S') instead.", "3.1.0")
117+
@deprecated("The scenario (starting with lowercase 's') method has been deprecated and will be removed in a future version of ScalaTest. Please use Scenario (starting with an uppercase 'S') instead. This can be rewritten automatically with autofix: https://github.com/scalatest/autofix/tree/master/3.1.x", "3.1.0")
116118
protected def scenario(specText: String, testTags: Tag*)(testFun: => Future[compatible.Assertion])(implicit pos: source.Position): Unit =
117119
Scenario(specText, testTags: _*)(testFun)(pos)
118120

@@ -165,8 +167,10 @@ trait AsyncFeatureSpecLike extends AsyncTestSuite with AsyncTestRegistration wit
165167
*
166168
* This method has been renamed for consistency with ScalaTest's `Given`, `When`, and `Then` methods, which were changed to uppper case
167169
* when Scala deprecated `then` as an identifier, and Cucumber, one of the main original inspirations for `FeatureSpec`.
170+
*
171+
* <p>This can be rewritten automatically with autofix: <a href="https://github.com/scalatest/autofix/tree/master/3.1.x">https://github.com/scalatest/autofix/tree/master/3.1.x</a>.</p>
168172
*/
169-
@deprecated("The feature (starting with lowercase 'f') method has been deprecated and will be removed in a future version of ScalaTest. Please use Feature (starting with an uppercase 'F') instead.", "3.1.0")
173+
@deprecated("The feature (starting with lowercase 'f') method has been deprecated and will be removed in a future version of ScalaTest. Please use Feature (starting with an uppercase 'F') instead. This can be rewritten automatically with autofix: https://github.com/scalatest/autofix/tree/master/3.1.x", "3.1.0")
170174
protected def feature(description: String)(fun: => Unit)(implicit pos: source.Position): Unit = Feature(description)(fun)(pos)
171175

172176
/**
@@ -350,8 +354,10 @@ trait AsyncFeatureSpecLike extends AsyncTestSuite with AsyncTestRegistration wit
350354
*
351355
* This method has been renamed for consistency with ScalaTest's `Given`, `When`, and `Then` methods, which were changed to uppper case
352356
* when Scala deprecated `then` as an identifier, and Cucumber, one of the main original inspirations for `FeatureSpec`.
357+
*
358+
* <p>This can be rewritten automatically with autofix: <a href="https://github.com/scalatest/autofix/tree/master/3.1.x">https://github.com/scalatest/autofix/tree/master/3.1.x</a>.</p>
353359
*/
354-
@deprecated("The scenariosFor (starting with lowercase 's') method has been deprecated and will be removed in a future version of ScalaTest. Please use ScenariosFor (starting with an uppercase 'S') instead.", "3.1.0")
360+
@deprecated("The scenariosFor (starting with lowercase 's') method has been deprecated and will be removed in a future version of ScalaTest. Please use ScenariosFor (starting with an uppercase 'S') instead. This can be rewritten automatically with autofix: https://github.com/scalatest/autofix/tree/master/3.1.x", "3.1.0")
355361
protected def scenariosFor(unit: Unit): Unit = ScenariosFor(unit)
356362

357363
/**

scalatest/src/main/scala/org/scalatest/featurespec/FixtureAnyFeatureSpecLike.scala

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,10 @@ trait FixtureAnyFeatureSpecLike extends org.scalatest.FixtureTestSuite with org.
135135
*
136136
* This method has been renamed for consistency with ScalaTest's `Given`, `When`, and `Then` methods, which were changed to uppper case
137137
* when Scala deprecated `then` as an identifier, and Cucumber, one of the main original inspirations for `FeatureSpec`.
138+
*
139+
* <p>This can be rewritten automatically with autofix: <a href="https://github.com/scalatest/autofix/tree/master/3.1.x">https://github.com/scalatest/autofix/tree/master/3.1.x</a>.</p>
138140
*/
139-
@deprecated("The scenario (starting with lowercase 's') method has been deprecated and will be removed in a future version of ScalaTest. Please use Scenario (starting with an uppercase 'S') instead.", "3.1.0")
141+
@deprecated("The scenario (starting with lowercase 's') method has been deprecated and will be removed in a future version of ScalaTest. Please use Scenario (starting with an uppercase 'S') instead. This can be rewritten automatically with autofix: https://github.com/scalatest/autofix/tree/master/3.1.x", "3.1.0")
140142
protected def scenario(specText: String, testTags: Tag*): ResultOfScenarioInvocation = Scenario(specText, testTags: _*)
141143

142144
/**
@@ -207,8 +209,10 @@ trait FixtureAnyFeatureSpecLike extends org.scalatest.FixtureTestSuite with org.
207209
*
208210
* This method has been renamed for consistency with ScalaTest's `Given`, `When`, and `Then` methods, which were changed to uppper case
209211
* when Scala deprecated `then` as an identifier, and Cucumber, one of the main original inspirations for `FeatureSpec`.
212+
*
213+
* <p>This can be rewritten automatically with autofix: <a href="https://github.com/scalatest/autofix/tree/master/3.1.x">https://github.com/scalatest/autofix/tree/master/3.1.x</a>.</p>
210214
*/
211-
@deprecated("The feature (starting with lowercase 'f') method has been deprecated and will be removed in a future version of ScalaTest. Please use Feature (starting with an uppercase 'F') instead.", "3.1.0")
215+
@deprecated("The feature (starting with lowercase 'f') method has been deprecated and will be removed in a future version of ScalaTest. Please use Feature (starting with an uppercase 'F') instead. This can be rewritten automatically with autofix: https://github.com/scalatest/autofix/tree/master/3.1.x", "3.1.0")
212216
protected def feature(description: String)(fun: => Unit)(implicit pos: source.Position): Unit = Feature(description)(fun)(pos)
213217

214218
/**
@@ -365,8 +369,10 @@ trait FixtureAnyFeatureSpecLike extends org.scalatest.FixtureTestSuite with org.
365369
*
366370
* This method has been renamed for consistency with ScalaTest's `Given`, `When`, and `Then` methods, which were changed to uppper case
367371
* when Scala deprecated `then` as an identifier, and Cucumber, one of the main original inspirations for `FeatureSpec`.
372+
*
373+
* <p>This can be rewritten automatically with autofix: <a href="https://github.com/scalatest/autofix/tree/master/3.1.x">https://github.com/scalatest/autofix/tree/master/3.1.x</a>.</p>
368374
*/
369-
@deprecated("The scenariosFor (starting with lowercase 's') method has been deprecated and will be removed in a future version of ScalaTest. Please use ScenariosFor (starting with an uppercase 'S') instead.", "3.1.0")
375+
@deprecated("The scenariosFor (starting with lowercase 's') method has been deprecated and will be removed in a future version of ScalaTest. Please use ScenariosFor (starting with an uppercase 'S') instead. This can be rewritten automatically with autofix: https://github.com/scalatest/autofix/tree/master/3.1.x", "3.1.0")
370376
protected def scenariosFor(unit: Unit): Unit = ScenariosFor(unit)
371377

372378
/**

scalatest/src/main/scala/org/scalatest/featurespec/FixtureAsyncFeatureSpecLike.scala

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,10 @@ trait FixtureAsyncFeatureSpecLike extends org.scalatest.FixtureAsyncTestSuite wi
119119
*
120120
* This method has been renamed for consistency with ScalaTest's `Given`, `When`, and `Then` methods, which were changed to uppper case
121121
* when Scala deprecated `then` as an identifier, and Cucumber, one of the main original inspirations for `FeatureSpec`.
122+
*
123+
* <p>This can be rewritten automatically with autofix: <a href="https://github.com/scalatest/autofix/tree/master/3.1.x">https://github.com/scalatest/autofix/tree/master/3.1.x</a>.</p>
122124
*/
123-
@deprecated("The scenario (starting with lowercase 's') method has been deprecated and will be removed in a future version of ScalaTest. Please use Scenario (starting with an uppercase 'S') instead.", "3.1.0")
125+
@deprecated("The scenario (starting with lowercase 's') method has been deprecated and will be removed in a future version of ScalaTest. Please use Scenario (starting with an uppercase 'S') instead. This can be rewritten automatically with autofix: https://github.com/scalatest/autofix/tree/master/3.1.x", "3.1.0")
124126
protected def scenario(specText: String, testTags: Tag*): ResultOfScenarioInvocation = Scenario(specText, testTags: _*)
125127

126128
/**
@@ -179,8 +181,10 @@ trait FixtureAsyncFeatureSpecLike extends org.scalatest.FixtureAsyncTestSuite wi
179181
*
180182
* This method has been renamed for consistency with ScalaTest's `Given`, `When`, and `Then` methods, which were changed to uppper case
181183
* when Scala deprecated `then` as an identifier, and Cucumber, one of the main original inspirations for `FeatureSpec`.
184+
*
185+
* <p>This can be rewritten automatically with autofix: <a href="https://github.com/scalatest/autofix/tree/master/3.1.x">https://github.com/scalatest/autofix/tree/master/3.1.x</a>.</p>
182186
*/
183-
@deprecated("The feature (starting with lowercase 'f') method has been deprecated and will be removed in a future version of ScalaTest. Please use Feature (starting with an uppercase 'F') instead.", "3.1.0")
187+
@deprecated("The feature (starting with lowercase 'f') method has been deprecated and will be removed in a future version of ScalaTest. Please use Feature (starting with an uppercase 'F') instead. This can be rewritten automatically with autofix: https://github.com/scalatest/autofix/tree/master/3.1.x", "3.1.0")
184188
protected def feature(description: String)(fun: => Unit)(implicit pos: source.Position): Unit = Feature(description)(fun)(pos)
185189

186190
/**
@@ -331,8 +335,10 @@ trait FixtureAsyncFeatureSpecLike extends org.scalatest.FixtureAsyncTestSuite wi
331335
*
332336
* This method has been renamed for consistency with ScalaTest's `Given`, `When`, and `Then` methods, which were changed to uppper case
333337
* when Scala deprecated `then` as an identifier, and Cucumber, one of the main original inspirations for `FeatureSpec`.
338+
*
339+
* <p>This can be rewritten automatically with autofix: <a href="https://github.com/scalatest/autofix/tree/master/3.1.x">https://github.com/scalatest/autofix/tree/master/3.1.x</a>.</p>
334340
*/
335-
@deprecated("The scenariosFor (starting with lowercase 's') method has been deprecated and will be removed in a future version of ScalaTest. Please use ScenariosFor (starting with an uppercase 'S') instead.", "3.1.0")
341+
@deprecated("The scenariosFor (starting with lowercase 's') method has been deprecated and will be removed in a future version of ScalaTest. Please use ScenariosFor (starting with an uppercase 'S') instead. This can be rewritten automatically with autofix: https://github.com/scalatest/autofix/tree/master/3.1.x", "3.1.0")
336342
protected def scenariosFor(unit: Unit): Unit = ScenariosFor(unit)
337343

338344
/**

0 commit comments

Comments
 (0)