diff --git a/website/docs/commands/fix.md b/website/docs/commands/fix.md new file mode 100644 index 0000000000..40f705435f --- /dev/null +++ b/website/docs/commands/fix.md @@ -0,0 +1,19 @@ +--- +title: Fix ⚡️ +sidebar_position: 28 +--- + +:::caution +The Fix command is experimental and requires setting the `--power` option to be used. +You can pass it explicitly or set it globally by running: + + scala-cli config power true +::: + +The `fix` command scans your project for `using` directives and extracts them into the `project.scala` file placed in the project root directory. +This allows to fix warnings tied to having `using` directives present in multiple files. +Additionally, `fix` will format the result file, thus allowing to quickly spot configuration options that may be duplicated. + +Files containing `using target` directives, e.g. `//> using target.scala 3.0.0` will not be changed by `fix`. + +The command respects the original scope of each extracted directive and will transform them into their `test.` equivalent if needed. diff --git a/website/docs/commands/misc/_category_.json b/website/docs/commands/misc/_category_.json index 7630af155e..41abaa715f 100644 --- a/website/docs/commands/misc/_category_.json +++ b/website/docs/commands/misc/_category_.json @@ -1,4 +1,4 @@ { "label": "Miscellaneous ⚡️", - "position": 29 + "position": 31 } diff --git a/website/docs/commands/package.md b/website/docs/commands/package.md index 10624c5a32..9f2ac767f3 100644 --- a/website/docs/commands/package.md +++ b/website/docs/commands/package.md @@ -1,6 +1,6 @@ --- title: Package ⚡️ -sidebar_position: 27 +sidebar_position: 29 --- :::caution diff --git a/website/docs/commands/publishing/_category_.json b/website/docs/commands/publishing/_category_.json index 1242b711d6..af01d125fe 100644 --- a/website/docs/commands/publishing/_category_.json +++ b/website/docs/commands/publishing/_category_.json @@ -1,4 +1,4 @@ { "label": "Publishing ⚡️", - "position": 28 + "position": 30 }