Skip to content

Commit 8010b19

Browse files
MaciejG604Gedochao
andauthored
Add docs for fix command (#2437)
* Add docs for fix command * Apply suggestions from code review Co-authored-by: Piotr Chabelski <[email protected]> --------- Co-authored-by: Piotr Chabelski <[email protected]>
1 parent 8263c39 commit 8010b19

File tree

4 files changed

+22
-3
lines changed

4 files changed

+22
-3
lines changed

website/docs/commands/fix.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
title: Fix ⚡️
3+
sidebar_position: 28
4+
---
5+
6+
:::caution
7+
The Fix command is experimental and requires setting the `--power` option to be used.
8+
You can pass it explicitly or set it globally by running:
9+
10+
scala-cli config power true
11+
:::
12+
13+
The `fix` command scans your project for `using` directives and extracts them into the `project.scala` file placed in the project root directory.
14+
This allows to fix warnings tied to having `using` directives present in multiple files.
15+
Additionally, `fix` will format the result file, thus allowing to quickly spot configuration options that may be duplicated.
16+
17+
Files containing `using target` directives, e.g. `//> using target.scala 3.0.0` will not be changed by `fix`.
18+
19+
The command respects the original scope of each extracted directive and will transform them into their `test.` equivalent if needed.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"label": "Miscellaneous ⚡️",
3-
"position": 29
3+
"position": 31
44
}

website/docs/commands/package.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Package ⚡️
3-
sidebar_position: 27
3+
sidebar_position: 29
44
---
55

66
:::caution
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"label": "Publishing ⚡️",
3-
"position": 28
3+
"position": 30
44
}

0 commit comments

Comments
 (0)