Skip to content

Commit 22f5bfc

Browse files
authored
docs: add a note about formatters and run command (#5997)
1 parent 2ec4b4c commit 22f5bfc

File tree

1 file changed

+9
-0
lines changed
  • docs/content/docs/configuration

1 file changed

+9
-0
lines changed

docs/content/docs/configuration/cli.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@ weight: 1
1313
{{< card link="/docs/linters/configuration/" title="Linter Settings" icon="adjustments" >}}
1414
{{< /cards >}}
1515

16+
> [!NOTE]
17+
> The formatters explicitly defined in the configuration section [`formatters`](/docs/configuration/file/#formatters-configuration) are automatically run by the command [`golangci-lint run`](/docs/configuration/cli/#run).
18+
>
19+
> You don't need to run [`golangci-lint fmt`](/docs/configuration/cli/#fmt) before [`golangci-lint run`](/docs/configuration/cli/#run)
20+
>
21+
> But the formatters cannot be enabled or disabled inside the `linters` section or the flags `-E/--enable`, `-D/--disable` of the command [`golangci-lint run`](/docs/configuration/cli/#run).
22+
>
23+
> The formatters can be enabled/disabled by defining them inside the [`formatters`](/docs/configuration/file/#formatters-configuration) section or by using the flags `-E/--enable`, `-D/--disable` of command [`golangci-lint fmt`](/docs/configuration/cli/#fmt).
24+
1625
{{% cli-output cmd="run" %}}
1726

1827
When the `--cpu-profile-path` or `--mem-profile-path` arguments are specified,

0 commit comments

Comments
 (0)