Skip to content

Commit c836556

Browse files
majk-pMee-Tree
authored andcommitted
Add warning about test files in publish docs (VirtusLab#3486)
1 parent 6e096e5 commit c836556

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

website/docs/commands/publishing/publish-local.md

+7
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,13 @@ Publishing io.github.scala-cli:hello-scala-cli_3:0.1.0-SNAPSHOT
4444
~/.ivy2/local/io.github.scala-cli/hello-scala-cli_3/0.1.0-SNAPSHOT/
4545
```
4646

47+
:::caution
48+
The `publish local` sub-command does not currently support publishing of the test scope.
49+
This includes any file that is placed in `test` directory or with the `.test.scala` suffix.
50+
51+
Read more about test sources in [testing documentation](../test.md#test-sources).
52+
:::
53+
4754
</ChainedSnippets>
4855

4956
## Required settings

website/docs/commands/publishing/publish.md

+7
Original file line numberDiff line numberDiff line change
@@ -322,3 +322,10 @@ Publishing io.github.scala-cli:hello-scala-cli_3:0.1.0-SNAPSHOT
322322
```
323323

324324
</ChainedSnippets>
325+
326+
:::caution
327+
The `publish local` sub-command does not currently support publishing of the test scope.
328+
This includes any file that is placed in `test` directory or with the `.test.scala` suffix.
329+
330+
Read more about test sources in [testing documentation](../test.md#test-sources).
331+
:::

website/docs/commands/test.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ path (`test/scala/b.scala`) contains a directory named `test`.
6868
Conversely, `scala-cli example/src/test` results in no test sources, since the relative path to `b.scala` does not
6969
contain `test` (the fact that the directory provided as input is named `test` does not make its content a test source).
7070

71-
Directives take precedence over file or path names, so `using target main` can be used to force `test/a.scala`
71+
Directives take precedence over file or path names, so `using target.scope main` can be used to force `test/a.scala`
7272
or `a.test.scala` to not be treated as tests.
7373

7474
As a rule of thumb, we recommend naming all of your test files with the `.test.scala` suffix.

0 commit comments

Comments
 (0)