diff --git a/docs/src/docs/product/migration-guide.mdx b/docs/src/docs/product/migration-guide.mdx index 963e1dd724fd..356ddc8e2e0d 100644 --- a/docs/src/docs/product/migration-guide.mdx +++ b/docs/src/docs/product/migration-guide.mdx @@ -2046,3 +2046,104 @@ version: "2" ``` + +### Command Line Flags + +The following flags have been removed: + +- `--disable-all` +- `--enable-all` +- `-p, --presets` +- `--fast` +- `-e, --exclude` +- `--exclude-case-sensitive` +- `--exclude-dirs-use-default` +- `--exclude-dirs` +- `--exclude-files` +- `--exclude-generated` +- `--exclude-use-default` +- `--go string` +- `--sort-order` +- `--sort-results` +- `--out-format` + +#### `--out-format` + +`--out-format` has been replaced with the following flags: + +```bash +# Previously 'colored-line-number' and 'line-number' +--output.text.path +--output.text.print-linter-name +--output.text.print-issued-lines +--output.text.colors +``` + +```bash +# Previously 'json' +--output.json.path +``` + +```bash +# Previously 'colored-tab' and 'tab' +--output.tab.path +--output.tab.print-linter-name +--output.tab.colors +``` + +```bash +# Previously 'html' +--output.html.path +``` + +```bash +# Previously 'checkstyle' +--output.checkstyle.path +``` + +```bash +# Previously 'code-climate' +--output.code-climate.path +``` + +```bash +# Previously 'junit-xml' and 'junit-xml-extended' +--output.junit-xml.path +--output.junit-xml.extended +``` + +```bash +# Previously 'teamcity' +--output.teamcity.path +``` + +```bash +# Previously 'sarif' +--output.sarif.path +``` + +#### `--disable-all` and `--enable-all` + +`--disable-all` has been replaced with `--default=none`. + +`--enable-all` has been replaced with `--default=all`. + +#### Example + +
+ v1 + + ```bash + golangci-lint run --disable-all --enable-only=govet --out-format=colored-tab --sort-order=linter --sort-results + ``` + +
+ +
+ v2 + + ```bash + golangci-lint run --default=none --enable-only=govet --out-format=colored-tab + ``` + +