From c7c2bd4f234586714605a14376195b8edcd094c5 Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Tue, 25 Mar 2025 13:12:45 +0100 Subject: [PATCH 1/3] docs: add section about flags migration --- docs/src/docs/product/migration-guide.mdx | 81 +++++++++++++++++++++++ 1 file changed, 81 insertions(+) diff --git a/docs/src/docs/product/migration-guide.mdx b/docs/src/docs/product/migration-guide.mdx index 963e1dd724fd..4021ee64baf7 100644 --- a/docs/src/docs/product/migration-guide.mdx +++ b/docs/src/docs/product/migration-guide.mdx @@ -2046,3 +2046,84 @@ version: "2" ``` + +### Flags + +The following flags has 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 to 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 + +```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 by `--default=none`. + +`--enable-all` has been replaced by `--default=all`. From bb303e2c44885c354c66023e94d633e78d8cb4dd Mon Sep 17 00:00:00 2001 From: Ludovic Fernandez Date: Tue, 25 Mar 2025 13:46:57 +0100 Subject: [PATCH 2/3] review Co-authored-by: Oleksandr Redko --- docs/src/docs/product/migration-guide.mdx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/src/docs/product/migration-guide.mdx b/docs/src/docs/product/migration-guide.mdx index 4021ee64baf7..a8bd17c7dd1e 100644 --- a/docs/src/docs/product/migration-guide.mdx +++ b/docs/src/docs/product/migration-guide.mdx @@ -2047,9 +2047,9 @@ version: "2" -### Flags +### Command Line Flags -The following flags has been removed: +The following flags have been removed: - `--disable-all` - `--enable-all` @@ -2069,7 +2069,7 @@ The following flags has been removed: #### `--out-format` -`--out-format` has been replaced to the following flags: +`--out-format` has been replaced with the following flags: ```bash # Previously 'colored-line-number' and 'line-number' @@ -2122,7 +2122,7 @@ The following flags has been removed: --output.sarif.path ``` -#### `--disable-all` and `--enable-all` +#### `--disable-all` and `--enable-all` `--disable-all` has been replaced by `--default=none`. From 15f89bee62b091a9838a786b3fc3589585ee58c2 Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Tue, 25 Mar 2025 13:49:11 +0100 Subject: [PATCH 3/3] review --- docs/src/docs/product/migration-guide.mdx | 26 ++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/docs/src/docs/product/migration-guide.mdx b/docs/src/docs/product/migration-guide.mdx index a8bd17c7dd1e..356ddc8e2e0d 100644 --- a/docs/src/docs/product/migration-guide.mdx +++ b/docs/src/docs/product/migration-guide.mdx @@ -2089,7 +2089,7 @@ The following flags have been removed: --output.tab.path --output.tab.print-linter-name --output.tab.colors -```bash +``` ```bash # Previously 'html' @@ -2124,6 +2124,26 @@ The following flags have been removed: #### `--disable-all` and `--enable-all` -`--disable-all` has been replaced by `--default=none`. +`--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 + ``` -`--enable-all` has been replaced by `--default=all`. +