Skip to content

Commit

Permalink
chore: update go directive (#466)
Browse files Browse the repository at this point in the history
  • Loading branch information
suzuki-shunsuke authored Jun 6, 2024
1 parent 2142b86 commit 6e0ca9c
Show file tree
Hide file tree
Showing 16 changed files with 1 addition and 17 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/suzuki-shunsuke/ghalint

go 1.19
go 1.22.4

require (
github.com/mattn/go-colorable v0.1.13
Expand Down
1 change: 0 additions & 1 deletion pkg/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ func TestValidate(t *testing.T) { //nolint:funlen
},
}
for _, d := range data {
d := d
t.Run(d.name, func(t *testing.T) {
t.Parallel()
if err := config.Validate(d.cfg); err != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ func TestActionRefShouldBeSHA1Policy_ApplyJob(t *testing.T) {
p := policy.NewActionRefShouldBeSHA1Policy()
logE := logrus.NewEntry(logrus.New())
for _, d := range data {
d := d
t.Run(d.name, func(t *testing.T) {
t.Parallel()
if err := p.ApplyJob(logE, d.cfg, nil, d.job); err != nil {
Expand Down Expand Up @@ -114,7 +113,6 @@ func TestActionRefShouldBeSHA1Policy_ApplyStep(t *testing.T) {
p := policy.NewActionRefShouldBeSHA1Policy()
logE := logrus.NewEntry(logrus.New())
for _, d := range data {
d := d
t.Run(d.name, func(t *testing.T) {
t.Parallel()
if err := p.ApplyStep(logE, d.cfg, nil, d.step); err != nil {
Expand Down
1 change: 0 additions & 1 deletion pkg/policy/action_shell_is_required_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ func TestActionShellIsRequiredPolicy_ApplyStep(t *testing.T) {
p := &policy.ActionShellIsRequiredPolicy{}
logE := logrus.NewEntry(logrus.New())
for _, d := range data {
d := d
t.Run(d.name, func(t *testing.T) {
t.Parallel()
if err := p.ApplyStep(logE, nil, nil, d.step); err != nil {
Expand Down
1 change: 0 additions & 1 deletion pkg/policy/deny_inherit_secrets_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ func TestDenyInheritSecretsPolicy_ApplyJob(t *testing.T) {
p := &policy.DenyInheritSecretsPolicy{}
logE := logrus.NewEntry(logrus.New())
for _, d := range data {
d := d
t.Run(d.name, func(t *testing.T) {
t.Parallel()
job := &workflow.Job{}
Expand Down
1 change: 0 additions & 1 deletion pkg/policy/deny_job_container_latest_image_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ func TestDenyJobContainerLatestImagePolicy_ApplyJob(t *testing.T) {
p := &policy.DenyJobContainerLatestImagePolicy{}
logE := logrus.NewEntry(logrus.New())
for _, d := range data {
d := d
t.Run(d.name, func(t *testing.T) {
t.Parallel()
if err := p.ApplyJob(logE, nil, nil, d.job); err != nil {
Expand Down
1 change: 0 additions & 1 deletion pkg/policy/deny_read_all_policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ func TestDenyReadAllPermissionPolicy_ApplyJob(t *testing.T) {
p := &policy.DenyReadAllPermissionPolicy{}
logE := logrus.NewEntry(logrus.New())
for _, d := range data {
d := d
if d.jobCtx == nil {
d.jobCtx = &policy.JobContext{
Workflow: &policy.WorkflowContext{
Expand Down
1 change: 0 additions & 1 deletion pkg/policy/deny_write_all_policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ func TestDenyWriteAllPermissionPolicy_ApplyJob(t *testing.T) {
p := &policy.DenyWriteAllPermissionPolicy{}
logE := logrus.NewEntry(logrus.New())
for _, d := range data {
d := d
if d.jobCtx == nil {
d.jobCtx = &policy.JobContext{
Workflow: &policy.WorkflowContext{
Expand Down
1 change: 0 additions & 1 deletion pkg/policy/github_app_should_limit_permissions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ func TestGitHubAppShouldLimitPermissionsPolicy_ApplyStep(t *testing.T) { //nolin
p := &policy.GitHubAppShouldLimitPermissionsPolicy{}
logE := logrus.NewEntry(logrus.New())
for _, d := range data {
d := d
if d.stepCtx == nil {
d.stepCtx = &policy.StepContext{
FilePath: ".github/workflows/test.yaml",
Expand Down
1 change: 0 additions & 1 deletion pkg/policy/github_app_should_limit_repositories_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ func TestGitHubAppShouldLimitRepositoriesPolicy_ApplyStep(t *testing.T) { //noli
p := &policy.GitHubAppShouldLimitRepositoriesPolicy{}
logE := logrus.NewEntry(logrus.New())
for _, d := range data {
d := d
if d.stepCtx == nil {
d.stepCtx = &policy.StepContext{
FilePath: ".github/workflows/test.yaml",
Expand Down
1 change: 0 additions & 1 deletion pkg/policy/job_permissions_policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ func TestJobPermissionsPolicy_ApplyJob(t *testing.T) { //nolint:funlen
p := &policy.JobPermissionsPolicy{}
logE := logrus.NewEntry(logrus.New())
for _, d := range data {
d := d
t.Run(d.name, func(t *testing.T) {
t.Parallel()
if err := p.ApplyJob(logE, nil, d.jobCtx, d.job); err != nil {
Expand Down
1 change: 0 additions & 1 deletion pkg/policy/job_secrets_policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ func TestJobSecretsPolicy_ApplyJob(t *testing.T) { //nolint:funlen
p := policy.NewJobSecretsPolicy()
logE := logrus.NewEntry(logrus.New())
for _, d := range data {
d := d
t.Run(d.name, func(t *testing.T) {
t.Parallel()
if err := p.ApplyJob(logE, d.cfg, d.jobCtx, d.job); err != nil {
Expand Down
1 change: 0 additions & 1 deletion pkg/policy/workflow_secrets_policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ func TestWorkflowSecretsPolicy_ApplyWorkflow(t *testing.T) { //nolint:funlen
p := policy.NewWorkflowSecretsPolicy()
logE := logrus.NewEntry(logrus.New())
for _, d := range data {
d := d
t.Run(d.name, func(t *testing.T) {
t.Parallel()
if err := p.ApplyWorkflow(logE, d.cfg, nil, d.wf); err != nil {
Expand Down
1 change: 0 additions & 1 deletion pkg/workflow/container_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ func TestContainer_UnmarshalYAML(t *testing.T) {
},
}
for _, d := range data {
d := d
t.Run(d.name, func(t *testing.T) {
t.Parallel()
c := &workflow.Container{}
Expand Down
1 change: 0 additions & 1 deletion pkg/workflow/job_secrets_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ func TestJobSecrets_UnmarshalYAML(t *testing.T) {
},
}
for _, d := range data {
d := d
t.Run(d.name, func(t *testing.T) {
t.Parallel()
js := &workflow.JobSecrets{}
Expand Down
1 change: 0 additions & 1 deletion pkg/workflow/permissions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ func TestPermissions_UnmarshalYAML(t *testing.T) {
},
}
for _, d := range data {
d := d
t.Run(d.name, func(t *testing.T) {
t.Parallel()
p := &workflow.Permissions{}
Expand Down

0 comments on commit 6e0ca9c

Please sign in to comment.