Add golangci-lilnt to CI (#1794)

This introduces a linter to PRs to help with code reviews and code hygiene. I've also gone ahead and fixed (or ignored) the existing lints.

I've only setup the default linters right now. There are many more options that are documented at https://golangci-lint.run/.

The GitHub Action should add appropriate annotations to the lint job for the PR. Contributors can also lint locally using `make lint`.
This commit is contained in:
Cory Miller
2022-09-20 20:08:22 -04:00
committed by GitHub
parent 718232f8f4
commit c91e76f169
17 changed files with 63 additions and 87 deletions

View File

@@ -41,18 +41,3 @@ func (c *Simulator) GetRunnerGroupsVisibleToRepository(ctx context.Context, org,
return visible, nil
}
func (c *Simulator) hasRepoAccessToOrganizationRunnerGroup(ctx context.Context, org string, runnerGroupId int64, repo string) (bool, error) {
repos, err := c.Client.ListRunnerGroupRepositoryAccesses(ctx, org, runnerGroupId)
if err != nil {
return false, err
}
for _, githubRepo := range repos {
if githubRepo.GetFullName() == repo {
return true, nil
}
}
return false, nil
}