Skip to content

Commit

Permalink
Fix lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
minamijoyo committed Jun 5, 2023
1 parent dba3400 commit f9e1bda
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 16 deletions.
2 changes: 1 addition & 1 deletion command/release.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type ReleaseCommand struct {
}

// Run runs the procedure of this command.
func (c *ReleaseCommand) Run(args []string) int {
func (c *ReleaseCommand) Run(args []string) int { // nolint revive unused-parameter
return cli.RunResultHelp
}

Expand Down
2 changes: 1 addition & 1 deletion release/github_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type mockGitHubClient struct {

var _ GitHubAPI = (*mockGitHubClient)(nil)

func (c *mockGitHubClient) RepositoriesListReleases(ctx context.Context, owner, repo string, opt *github.ListOptions) ([]*github.RepositoryRelease, *github.Response, error) {
func (c *mockGitHubClient) RepositoriesListReleases(ctx context.Context, owner, repo string, opt *github.ListOptions) ([]*github.RepositoryRelease, *github.Response, error) { // nolint revive unused-parameter
return c.repositoryReleases, c.response, c.err
}

Expand Down
2 changes: 1 addition & 1 deletion release/gitlab_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type mockGitLabClient struct {
var _ GitLabAPI = (*mockGitLabClient)(nil)

// ProjectListReleases returns a list of releases for the mockGitLabClient.
func (c *mockGitLabClient) ProjectListReleases(ctx context.Context, owner, repo string, opt *gitlab.ListReleasesOptions) ([]*gitlab.Release, *gitlab.Response, error) {
func (c *mockGitLabClient) ProjectListReleases(ctx context.Context, owner, repo string, opt *gitlab.ListReleasesOptions) ([]*gitlab.Release, *gitlab.Response, error) { // nolint revive unused-parameter
return c.projectReleases, c.response, c.err
}

Expand Down
2 changes: 1 addition & 1 deletion release/release_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type mockRelease struct {

var _ Release = (*mockRelease)(nil)

func (r *mockRelease) ListReleases(ctx context.Context) ([]string, error) {
func (r *mockRelease) ListReleases(ctx context.Context) ([]string, error) { // nolint revive unused-parameter
return r.versions, r.err
}

Expand Down
4 changes: 2 additions & 2 deletions release/tfregistry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ type mockTFRegistryClient struct {

var _ TFRegistryAPI = (*mockTFRegistryClient)(nil)

func (c *mockTFRegistryClient) ModuleLatestForProvider(ctx context.Context, req *tfregistry.ModuleLatestForProviderRequest) (*tfregistry.ModuleLatestForProviderResponse, error) {
func (c *mockTFRegistryClient) ModuleLatestForProvider(ctx context.Context, req *tfregistry.ModuleLatestForProviderRequest) (*tfregistry.ModuleLatestForProviderResponse, error) { // nolint revive unused-parameter
return c.moduleRes, c.err
}

func (c *mockTFRegistryClient) ProviderLatest(ctx context.Context, req *tfregistry.ProviderLatestRequest) (*tfregistry.ProviderLatestResponse, error) {
func (c *mockTFRegistryClient) ProviderLatest(ctx context.Context, req *tfregistry.ProviderLatestRequest) (*tfregistry.ProviderLatestResponse, error) { // nolint revive unused-parameter
return c.providerRes, c.err
}

Expand Down
6 changes: 1 addition & 5 deletions tfupdate/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,7 @@ func NewModuleUpdater(name string, version string) (Updater, error) {
// Update updates the module version constraint.
// Note that this method will rewrite the AST passed as an argument.
func (u *ModuleUpdater) Update(f *hclwrite.File) error {
if err := u.updateModuleBlock(f); err != nil {
return err
}

return nil
return u.updateModuleBlock(f)
}

func (u *ModuleUpdater) updateModuleBlock(f *hclwrite.File) error {
Expand Down
6 changes: 1 addition & 5 deletions tfupdate/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,7 @@ func (u *ProviderUpdater) Update(f *hclwrite.File) error {
return err
}

if err := u.updateProviderBlock(f); err != nil {
return err
}

return nil
return u.updateProviderBlock(f)
}

func (u *ProviderUpdater) updateTerraformBlock(f *hclwrite.File) error {
Expand Down

0 comments on commit f9e1bda

Please sign in to comment.