Skip to content

Commit

Permalink
exclude gosec from test files
Browse files Browse the repository at this point in the history
  • Loading branch information
miniscruff committed Jun 25, 2024
1 parent b07283b commit dc9155e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,8 @@ linters:
- unused
- whitespace
- wsl
issues:
exclude-rules:
- path: '(.+)_test\.go'
linters:
- gosec
8 changes: 4 additions & 4 deletions core/replacement_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ replaced here
third line
ignore me`

err := os.WriteFile(filepath, []byte(startData), os.ModeTemporary)
err := os.WriteFile(filepath, []byte(startData), os.ModePerm)
then.Nil(t, err)

rep := Replacement{
Expand All @@ -46,7 +46,7 @@ func TestFindAndReplaceWithTemplate(t *testing.T) {
"version": "1.1.0",
}`

err := os.WriteFile(filepath, []byte(startData), os.ModeTemporary)
err := os.WriteFile(filepath, []byte(startData), os.ModePerm)
then.Nil(t, err)

rep := Replacement{
Expand Down Expand Up @@ -78,7 +78,7 @@ level1:
version: 0.0.1
`

err := os.WriteFile(filepath, []byte(startData), os.ModeTemporary)
err := os.WriteFile(filepath, []byte(startData), os.ModePerm)
then.Nil(t, err)

rep := Replacement{
Expand Down Expand Up @@ -110,7 +110,7 @@ level1:
version: 0.0.1
`

err := os.WriteFile(filepath, []byte(startData), os.ModeTemporary)
err := os.WriteFile(filepath, []byte(startData), os.ModePerm)
then.Nil(t, err)

rep := Replacement{
Expand Down

0 comments on commit dc9155e

Please sign in to comment.