Compare commits

...

6 Commits

Author SHA1 Message Date
sudo pacman -Syu e7feb0ccf9
chore: add linters gocritic 2022-11-20 21:20:40 +07:00
sudo pacman -Syu 16846319b0
chore: add more linters 2022-11-20 21:20:40 +07:00
dependabot[bot] 6da2c03bc5 build(deps): bump golang.org/x/mod from 0.6.0 to 0.7.0
Bumps [golang.org/x/mod](https://github.com/golang/mod) from 0.6.0 to 0.7.0.
- [Release notes](https://github.com/golang/mod/releases)
- [Commits](https://github.com/golang/mod/compare/v0.6.0...v0.7.0)

---
updated-dependencies:
- dependency-name: golang.org/x/mod
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-09 21:34:23 -08:00
dependabot[bot] 9678311f96 build(deps): bump github.com/urfave/cli/v2 from 2.23.4 to 2.23.5
Bumps [github.com/urfave/cli/v2](https://github.com/urfave/cli) from 2.23.4 to 2.23.5.
- [Release notes](https://github.com/urfave/cli/releases)
- [Changelog](https://github.com/urfave/cli/blob/main/docs/CHANGELOG.md)
- [Commits](https://github.com/urfave/cli/compare/v2.23.4...v2.23.5)

---
updated-dependencies:
- dependency-name: github.com/urfave/cli/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-08 21:54:03 -08:00
dependabot[bot] 73d893ca0c build(deps): bump github.com/urfave/cli/v2 from 2.23.2 to 2.23.4
Bumps [github.com/urfave/cli/v2](https://github.com/urfave/cli) from 2.23.2 to 2.23.4.
- [Release notes](https://github.com/urfave/cli/releases)
- [Changelog](https://github.com/urfave/cli/blob/main/docs/CHANGELOG.md)
- [Commits](https://github.com/urfave/cli/compare/v2.23.2...v2.23.4)

---
updated-dependencies:
- dependency-name: github.com/urfave/cli/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-07 21:45:33 -08:00
dependabot[bot] 904ea3a797 build(deps): bump github.com/urfave/cli/v2 from 2.23.0 to 2.23.2
Bumps [github.com/urfave/cli/v2](https://github.com/urfave/cli) from 2.23.0 to 2.23.2.
- [Release notes](https://github.com/urfave/cli/releases)
- [Changelog](https://github.com/urfave/cli/blob/main/docs/CHANGELOG.md)
- [Commits](https://github.com/urfave/cli/compare/v2.23.0...v2.23.2)

---
updated-dependencies:
- dependency-name: github.com/urfave/cli/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-03 22:44:11 -07:00
4 changed files with 20 additions and 10 deletions

View File

@ -19,12 +19,15 @@ linters:
- errcheck - errcheck
- gosimple - gosimple
- govet - govet
- ineffassign
- staticcheck - staticcheck
- typecheck - typecheck
- unused - unused
- errchkjson
- errname - errname
- errorlint - errorlint
- execinquery - execinquery
- gocritic
- goerr113 - goerr113
- gofumpt - gofumpt
- gosec - gosec
@ -38,7 +41,10 @@ linters:
linters-settings: linters-settings:
gosec: gosec:
excludes: excludes:
- G101
- G112
- G402 - G402
- G404
- G501 - G501
- G505 - G505
exclude-generated: true exclude-generated: true
@ -63,3 +69,7 @@ linters-settings:
- unusedresult - unusedresult
staticcheck: staticcheck:
checks: ["all", "-SA1019"] checks: ["all", "-SA1019"]
gocritic:
enabled-tags:
- style
- performance

4
go.mod
View File

@ -12,8 +12,8 @@ require (
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e
github.com/sebdah/goldie/v2 v2.5.3 github.com/sebdah/goldie/v2 v2.5.3
github.com/stretchr/testify v1.8.1 github.com/stretchr/testify v1.8.1
github.com/urfave/cli/v2 v2.23.0 github.com/urfave/cli/v2 v2.23.5
golang.org/x/mod v0.6.0 golang.org/x/mod v0.7.0
) )
require ( require (

8
go.sum
View File

@ -104,8 +104,8 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/urfave/cli/v2 v2.23.0 h1:pkly7gKIeYv3olPAeNajNpLjeJrmTPYCoZWaV+2VfvE= github.com/urfave/cli/v2 v2.23.5 h1:xbrU7tAYviSpqeR3X4nEFWUdB/uDZ6DE+HxmRU7Xtyw=
github.com/urfave/cli/v2 v2.23.0/go.mod h1:1CNUng3PtjQMtRzJO4FMXBQvkGtuYRxxiR9xMa7jMwI= github.com/urfave/cli/v2 v2.23.5/go.mod h1:GHupkWPMM0M/sj1a2b4wUrWBPzazNrIjouW6fmdJLxc=
github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0= github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0=
github.com/xanzy/ssh-agent v0.3.1 h1:AmzO1SSWxw73zxFZPRwaMN1MohDw8UyHnmuxyceTEGo= github.com/xanzy/ssh-agent v0.3.1 h1:AmzO1SSWxw73zxFZPRwaMN1MohDw8UyHnmuxyceTEGo=
github.com/xanzy/ssh-agent v0.3.1/go.mod h1:QIE4lCeL7nkC25x+yA3LBIYfwCc1TFziCtG7cBAac6w= github.com/xanzy/ssh-agent v0.3.1/go.mod h1:QIE4lCeL7nkC25x+yA3LBIYfwCc1TFziCtG7cBAac6w=
@ -117,8 +117,8 @@ golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.1.0 h1:MDRAIl0xIo9Io2xV565hzXHw3zVseKrJKodhohM5CjU= golang.org/x/crypto v0.1.0 h1:MDRAIl0xIo9Io2xV565hzXHw3zVseKrJKodhohM5CjU=
golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw=
golang.org/x/mod v0.6.0 h1:b9gGHsz9/HhJ3HF5DHQytPpuwocVTChQJK3AvoLRD5I= golang.org/x/mod v0.7.0 h1:LapD9S96VoQRhi/GrNTqeBJFrUjs5UHCAtTlgwA5oZA=
golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20210326060303-6b1517762897/go.mod h1:uSPa2vr4CLtc/ILN5odXGNXS6mhrKVzTaCXzk9m6W3k= golang.org/x/net v0.0.0-20210326060303-6b1517762897/go.mod h1:uSPa2vr4CLtc/ILN5odXGNXS6mhrKVzTaCXzk9m6W3k=
golang.org/x/net v0.1.0 h1:hZ/3BUoy5aId7sCpA/Tc5lt8DkFgdVS2onTpJsZ/fl0= golang.org/x/net v0.1.0 h1:hZ/3BUoy5aId7sCpA/Tc5lt8DkFgdVS2onTpJsZ/fl0=

View File

@ -140,10 +140,10 @@ func (a *action) generateMarkdownChangelog(output, version string, commits []con
} }
// Generate markdown from commits // Generate markdown from commits
newNodes := changelog.GenerateMarkdown(commits, a.flags.scopes, version, time.Now()) nodes := changelog.GenerateMarkdown(commits, a.flags.scopes, version, time.Now())
// Final changelog with new commits above old commits // Final changelog with new commits above old commits
nodes := append(newNodes, oldNodes...) nodes = append(nodes, oldNodes...)
changelogText := markdown.GenerateText(nodes) changelogText := markdown.GenerateText(nodes)
// Demo run // Demo run
@ -172,10 +172,10 @@ func (a *action) generateRSTChangelog(output, version string, commits []conventi
} }
// Generate markdown from commits // Generate markdown from commits
newNodes := changelog.GenerateRST(commits, a.flags.scopes, version, time.Now()) nodes := changelog.GenerateRST(commits, a.flags.scopes, version, time.Now())
// Final changelog with new commits above old commits // Final changelog with new commits above old commits
nodes := append(newNodes, oldNodes...) nodes = append(nodes, oldNodes...)
changelogText := rst.GenerateText(nodes) changelogText := rst.GenerateText(nodes)
// Demo run // Demo run