chore: gosec
parent
1790f46cc0
commit
35606f3a78
|
@ -72,6 +72,8 @@ linters-settings:
|
||||||
excludes:
|
excludes:
|
||||||
- G101
|
- G101
|
||||||
- G112
|
- G112
|
||||||
|
- G115
|
||||||
|
- G204
|
||||||
- G402
|
- G402
|
||||||
- G404
|
- G404
|
||||||
- G501
|
- G501
|
||||||
|
|
|
@ -163,7 +163,7 @@ func (a *action) generateChangelog(commits []convention.Commit, finalOutput, ver
|
||||||
func (a *action) generateMarkdownChangelog(output, version string, commits []convention.Commit) error {
|
func (a *action) generateMarkdownChangelog(output, version string, commits []convention.Commit) error {
|
||||||
// If changelog file already exist, parse markdown from exist file
|
// If changelog file already exist, parse markdown from exist file
|
||||||
var oldNodes []markdown.Node
|
var oldNodes []markdown.Node
|
||||||
bytes, err := os.ReadFile(output)
|
bytes, err := os.ReadFile(filepath.Clean(output))
|
||||||
if err == nil {
|
if err == nil {
|
||||||
oldNodes = changelog.ParseMarkdown(string(bytes))
|
oldNodes = changelog.ParseMarkdown(string(bytes))
|
||||||
}
|
}
|
||||||
|
@ -195,7 +195,7 @@ func (a *action) generateMarkdownChangelog(output, version string, commits []con
|
||||||
func (a *action) generateRSTChangelog(output, version string, commits []convention.Commit) error {
|
func (a *action) generateRSTChangelog(output, version string, commits []convention.Commit) error {
|
||||||
// If changelog file already exist, parse markdown from exist file
|
// If changelog file already exist, parse markdown from exist file
|
||||||
var oldNodes []rst.Node
|
var oldNodes []rst.Node
|
||||||
bytes, err := os.ReadFile(output)
|
bytes, err := os.ReadFile(filepath.Clean(output))
|
||||||
if err == nil {
|
if err == nil {
|
||||||
oldNodes = changelog.ParseRST(string(bytes))
|
oldNodes = changelog.ParseRST(string(bytes))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue