From 4f3fa04f12801f6e78b2fc423fe18b3e951c7970 Mon Sep 17 00:00:00 2001 From: Oleksandr Redko Date: Fri, 20 Jun 2025 13:02:45 +0300 Subject: [PATCH 1/3] docs: update migration guide with --print-issued-lines --- docs/src/docs/product/migration-guide.mdx | 34 ++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/docs/src/docs/product/migration-guide.mdx b/docs/src/docs/product/migration-guide.mdx index ac3da4cf6d2c..d6848094c8ba 100644 --- a/docs/src/docs/product/migration-guide.mdx +++ b/docs/src/docs/product/migration-guide.mdx @@ -2070,6 +2070,8 @@ The following flags have been removed: - `--sort-order` - `--sort-results` - `--out-format` +- `--print-issued-lines` +- `--print-linter-name` #### `--out-format` @@ -2126,13 +2128,23 @@ The following flags have been removed: --output.sarif.path ``` +#### `--print-issued-lines` + +`--print-issued-lines` has been replaced with `--output.text.print-issued-lines`. + +#### `--print-linter-name` + +`--print-linter-name` has been replaced with `--output.text.print-linter-name` or `--output.tab.print-linter-name`. + #### `--disable-all` and `--enable-all` `--disable-all` has been replaced with `--default=none`. `--enable-all` has been replaced with `--default=all`. -#### Example +#### Examples + +Run only the `govet` linter, output results to stdout in JSON format, and sort results:
v1 @@ -2151,3 +2163,23 @@ golangci-lint run --default=none --enable=govet --output.json.path=stdout ```
+ +Run all linters, do not print issued lines, output results to stdout without colors, and save to `gl-code-quality-report.json` in Code Climate's format: + +
+ v1 + +```bash +golangci-lint run --print-issued-lines=false --out-format code-climate:gl-code-quality-report.json,line-number +``` + +
+ +
+ v2 + +```bash +golangci-lint run --output.text.path=stdout --output.text.colors=false --output.text.print-issued-lines=false --output.code-climate.path=gl-code-quality-report.json +``` + +
From 3f6751d45658318eadebdd0942910c48462f8216 Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Fri, 20 Jun 2025 12:16:25 +0200 Subject: [PATCH 2/3] review --- docs/src/docs/product/migration-guide.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/docs/product/migration-guide.mdx b/docs/src/docs/product/migration-guide.mdx index d6848094c8ba..102540e8a76f 100644 --- a/docs/src/docs/product/migration-guide.mdx +++ b/docs/src/docs/product/migration-guide.mdx @@ -2164,7 +2164,7 @@ golangci-lint run --default=none --enable=govet --output.json.path=stdout -Run all linters, do not print issued lines, output results to stdout without colors, and save to `gl-code-quality-report.json` in Code Climate's format: +Do not print issued lines, output results to stdout without colors, and save to `gl-code-quality-report.json` in Code Climate's format:
v1 From de0929ce5d630a7ee735434585a8d5874109802c Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Fri, 20 Jun 2025 12:20:18 +0200 Subject: [PATCH 3/3] review --- docs/src/docs/product/migration-guide.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/docs/product/migration-guide.mdx b/docs/src/docs/product/migration-guide.mdx index 102540e8a76f..fbcbef51d998 100644 --- a/docs/src/docs/product/migration-guide.mdx +++ b/docs/src/docs/product/migration-guide.mdx @@ -2164,7 +2164,7 @@ golangci-lint run --default=none --enable=govet --output.json.path=stdout
-Do not print issued lines, output results to stdout without colors, and save to `gl-code-quality-report.json` in Code Climate's format: +Do not print issued lines, output results to stdout without colors in text format, and to `gl-code-quality-report.json` file in Code Climate's format:
v1