Repository: go-critic/go-critic
Pull request #1320 (2023-02-22 07:22:43)

deps: bump toolmantim/release-drafter from 5.20.0 to 5.23.0
Bumps [toolmantim/release-drafter](https://github.com/toolmantim/release-drafter) from 5.20.0 to 5.23.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/toolmantim/release-drafter/releases">toolmantim/release-drafter's releases</a>.</em></p>
<blockquote>
<h2>v5.23.0</h2>
<h1>What's Changed</h1>
<h2>New</h2>
<ul>
<li>Add <code>include-pre-releases</code> configuration option (<a href="https://github-redirect.dependabot.com/toolmantim/release-drafter/issues/1302">#1302</a>) <a href="https://github.com/robbinjanssen"><code>@​robbinjanssen</code></a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/release-drafter/release-drafter/compare/v5.22.0...v5.23.0">https://github.com/release-drafter/release-drafter/compare/v5.22.0...v5.23.0</a></p>
<h2>v5.22.0</h2>
<h1>What's Changed</h1>
<h2>New</h2>
<ul>
<li>Only use last full release when drafting (<a href="https://github-redirect.dependabot.com/toolmantim/release-drafter/issues/1240">#1240</a>) <a href="https://github.com/ssbarnea"><code>@​ssbarnea</code></a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/release-drafter/release-drafter/compare/v5.21.1...v5.22.0">https://github.com/release-drafter/release-drafter/compare/v5.21.1...v5.22.0</a></p>
<h2>v5.21.1</h2>
<h1>What's Changed</h1>
<h2>Dependency Updates</h2>
<ul>
<li>Address <code>set-output</code> deprecation (<a href="https://github-redirect.dependabot.com/toolmantim/release-drafter/issues/1247">#1247</a>) <a href="https://github.com/NotMyFault"><code>@​NotMyFault</code></a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/release-drafter/release-drafter/compare/v5.21.0...v5.21.1">https://github.com/release-drafter/release-drafter/compare/v5.21.0...v5.21.1</a></p>
<h2>v5.21.0</h2>
<h1>What's Changed</h1>
<h2>New</h2>
<ul>
<li>fetch 100 labels for pull requests instead of 10 (<a href="https://github-redirect.dependabot.com/toolmantim/release-drafter/issues/1220">#1220</a>) <a href="https://github.com/matoubidou"><code>@​matoubidou</code></a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/release-drafter/release-drafter/compare/v5.20.1...v5.21.0">https://github.com/release-drafter/release-drafter/compare/v5.20.1...v5.21.0</a></p>
<h2>v5.20.1</h2>
<h1>What's Changed</h1>
<h2>Bug Fixes</h2>
<ul>
<li>Add missing inputs to action config (<a href="https://github-redirect.dependabot.com/toolmantim/release-drafter/issues/1202">#1202</a>) <a href="https://github.com/gilbertsoft"><code>@​gilbertsoft</code></a></li>
</ul>
<h2>Documentation</h2>
<ul>
<li>Add more comments about pull requests permission (<a href="https://github-redirect.dependabot.com/toolmantim/release-drafter/issues/1187">#1187</a>) <a href="https://github.com/Kirade"><code>@​Kirade</code></a></li>
<li>Fix Vercel link (<a href="https://github-redirect.dependabot.com/toolmantim/release-drafter/issues/1188">#1188</a>) <a href="https://github.com/shinshin86"><code>@​shinshin86</code></a></li>
<li>Add permissions to README (<a href="https://github-redirect.dependabot.com/toolmantim/release-drafter/issues/1132">#1132</a>) <a href="https://github.com/danyeaw"><code>@​danyeaw</code></a></li>
</ul>
<h2>Dependency Updates</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/release-drafter/release-drafter/commit/569eb7ee3a85817ab916c8f8ff03a5bd96c9c83e"><code>569eb7e</code></a> v5.23.0</li>
<li><a href="https://github.com/release-drafter/release-drafter/commit/e11806d904d047c40ca4a6ef9da1b50ba0bda48a"><code>e11806d</code></a> Add <code>include-pre-releases</code> configuration option (<a href="https://github-redirect.dependabot.com/toolmantim/release-drafter/issues/1302">#1302</a>)</li>
<li><a href="https://github.com/release-drafter/release-drafter/commit/cfc5540ebc9d65a8731f02032e3d44db5e449fb6"><code>cfc5540</code></a> v5.22.0</li>
<li><a href="https://github.com/release-drafter/release-drafter/commit/7ef15e2cd3a232ad5ec79f969d14fac92ce74916"><code>7ef15e2</code></a> Only use last full release when drafting (<a href="https://github-redirect.dependabot.com/toolmantim/release-drafter/issues/1240">#1240</a>)</li>
<li><a href="https://github.com/release-drafter/release-drafter/commit/6df64e4ba4842c203c604c1f45246c5863410adb"><code>6df64e4</code></a> v5.21.1</li>
<li><a href="https://github.com/release-drafter/release-drafter/commit/26be07dd722ac30b3654866705774d00e09de496"><code>26be07d</code></a> Address <code>set-output</code> deprecation (<a href="https://github-redirect.dependabot.com/toolmantim/release-drafter/issues/1247">#1247</a>)</li>
<li><a href="https://github.com/release-drafter/release-drafter/commit/df69d584deac33d8569990cb6413f82447181076"><code>df69d58</code></a> v5.21.0</li>
<li><a href="https://github.com/release-drafter/release-drafter/commit/ecbbed96e59dfeb4f433d84fbdca2b1e01887d62"><code>ecbbed9</code></a> fetch 100 labels for pull requests instead of 10 (<a href="https://github-redirect.dependabot.com/toolmantim/release-drafter/issues/1220">#1220</a>)</li>
<li><a href="https://github.com/release-drafter/release-drafter/commit/06a49bf28488e030d35ca2ac6dbf7f408a481779"><code>06a49bf</code></a> v5.20.1</li>
<li><a href="https://github.com/release-drafter/release-drafter/commit/6e6a13ca0e4cab53b76372c9d82e4c801b501dcf"><code>6e6a13c</code></a> Add missing inputs to action config (<a href="https://github-redirect.dependabot.com/toolmantim/release-drafter/issues/1202">#1202</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/toolmantim/release-drafter/compare/v5.20.0...v5.23.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=toolmantim/release-drafter&package-manager=github_actions&previous-version=5.20.0&new-version=5.23.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>


Patch:
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 546f89f..192b3f4 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -8,7 +8,7 @@ jobs:
     runs-on: ubuntu-latest
     steps:
       # Drafts your next Release notes as Pull Requests are merged into "master"
-      - uses: toolmantim/release-drafter@v5.20.0
+      - uses: toolmantim/release-drafter@v5.23.0
         env:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
 
diff --git a/framework/lintmain/internal/check/check.go b/cmd/gocritic/check.go
similarity index 99%
rename from framework/lintmain/internal/check/check.go
rename to cmd/gocritic/check.go
index b4a43b8..a45e84a 100644
--- a/framework/lintmain/internal/check/check.go
+++ b/cmd/gocritic/check.go
@@ -1,4 +1,4 @@
-package check
+package main
 
 import (
 	"bytes"
@@ -26,7 +26,7 @@ import (
 )
 
 // Main implements sub-command entry point.
-func Main(_ context.Context, args []string) error {
+func runCheck(_ context.Context, args []string) error {
 	var p program
 	p.flagSet = flag.NewFlagSet("gocritic", flag.ContinueOnError)
 	p.infoList = linter.GetCheckersInfo()
diff --git a/framework/lintmain/internal/lintdoc/doc.go b/cmd/gocritic/doc.go
similarity index 96%
rename from framework/lintmain/internal/lintdoc/doc.go
rename to cmd/gocritic/doc.go
index 4609114..4f4ccfd 100644
--- a/framework/lintmain/internal/lintdoc/doc.go
+++ b/cmd/gocritic/doc.go
@@ -1,4 +1,4 @@
-package lintdoc
+package main
 
 import (
 	"context"
@@ -13,7 +13,7 @@ import (
 )
 
 // Main implements sub-command entry point.
-func Main(_ context.Context, args []string) error {
+func runDocs(_ context.Context, args []string) error {
 	flagSet := flag.NewFlagSet("gocritic", flag.ContinueOnError)
 	if err := flagSet.Parse(args); err != nil {
 		return err
diff --git a/cmd/gocritic/main.go b/cmd/gocritic/main.go
index 47e8644..f8a87b7 100644
--- a/cmd/gocritic/main.go
+++ b/cmd/gocritic/main.go
@@ -1,8 +1,11 @@
 package main
 
 import (
-	"github.com/go-critic/go-critic/checkers" // Register go-critic checkers
-	"github.com/go-critic/go-critic/framework/lintmain"
+	"log"
+
+	"github.com/go-critic/go-critic/checkers"
+
+	"github.com/cristalhq/acmd"
 )
 
 var Version = "v0.0.0-SNAPSHOT"
@@ -13,8 +16,41 @@ func main() {
 		panic(err)
 	}
 
-	lintmain.Run(lintmain.Config{
+	run(config{
 		Name:    "gocritic",
 		Version: Version,
 	})
 }
+
+// config is used to parametrize the linter.
+type config struct {
+	Version string
+	Name    string
+}
+
+// Run executes corresponding main after sub-command resolving.
+// Does not return.
+func run(cfg config) {
+	log.SetFlags(0)
+
+	cmds := []acmd.Command{
+		{
+			Name:        "check",
+			Description: "run linter over specified targets",
+			ExecFunc:    runCheck,
+		},
+		{
+			Name:        "doc",
+			Description: "get installed checkers documentation",
+			ExecFunc:    runDocs,
+		},
+	}
+
+	r := acmd.RunnerOf(cmds, acmd.Config{
+		AppName: cfg.Name,
+		Version: cfg.Version,
+	})
+	if err := r.Run(); err != nil {
+		log.Print(err.Error())
+	}
+}
diff --git a/framework/lintmain/lintmain.go b/framework/lintmain/lintmain.go
deleted file mode 100644
index 519a565..0000000
--- a/framework/lintmain/lintmain.go
+++ /dev/null
@@ -1,43 +0,0 @@
-package lintmain
-
-import (
-	"log"
-
-	"github.com/go-critic/go-critic/framework/lintmain/internal/check"
-	"github.com/go-critic/go-critic/framework/lintmain/internal/lintdoc"
-
-	"github.com/cristalhq/acmd"
-)
-
-// Config is used to parametrize the linter.
-type Config struct {
-	Version string
-	Name    string
-}
-
-// Run executes corresponding main after sub-command resolving.
-// Does not return.
-func Run(cfg Config) {
-	log.SetFlags(0)
-
-	r := acmd.RunnerOf(cmds, acmd.Config{
-		AppName: cfg.Name,
-		Version: cfg.Version,
-	})
-	if err := r.Run(); err != nil {
-		log.Print(err.Error())
-	}
-}
-
-var cmds = []acmd.Command{
-	{
-		Name:        "check",
-		Description: "run linter over specified targets",
-		ExecFunc:    check.Main,
-	},
-	{
-		Name:        "doc",
-		Description: "get installed checkers documentation",
-		ExecFunc:    lintdoc.Main,
-	},
-}


Test patch:
diff --git a/framework/lintmain/internal/check/check_test.go b/cmd/gocritic/check_test.go
similarity index 98%
rename from framework/lintmain/internal/check/check_test.go
rename to cmd/gocritic/check_test.go
index e6707b8..d1e4428 100644
--- a/framework/lintmain/internal/check/check_test.go
+++ b/cmd/gocritic/check_test.go
@@ -1,4 +1,4 @@
-package check
+package main
 
 import (
 	"testing"