Skip to content

Commit

Permalink
fix: index out of range (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
sivchari authored Jul 18, 2022
1 parent d35ec69 commit bf792de
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 1 deletion.
26 changes: 26 additions & 0 deletions .github/workflows/gh-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: gh-release

on:
push:
branches:
- main
paths:
- '**/RELEASE'
pull_request:
types: [opened, synchronize]
branches:
- main
paths:
- '**/RELEASE'

jobs:
gh-release:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: pipe-cd/actions-gh-release@v2.3.6
with:
release_file: '**/RELEASE'
token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion release/RELEASE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
tag: v1.6.0
tag: v1.7.0
prerelease: false

releaseNoteGenerator:
Expand Down
3 changes: 3 additions & 0 deletions tenv.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,9 @@ func targetRunner(params []*ast.Field, fileName string) (string, bool) {
switch typ := p.Type.(type) {
case *ast.StarExpr:
if checkStarExprTarget(typ) {
if len(p.Names) == 0 {
return "", false
}
argName := p.Names[0].Name
return argName, true
}
Expand Down
4 changes: 4 additions & 0 deletions testdata/src/a/a_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,7 @@ func TestFunctionLiteral(t *testing.T) {
}
})
}

func TestEmpty(t *testing.T) {
t.Run("test", func(*testing.T) {})
}

0 comments on commit bf792de

Please sign in to comment.