Skip to content

Commit

Permalink
chore: fix linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
christophwitzko committed Sep 13, 2023
1 parent 9f92775 commit d2be812
Show file tree
Hide file tree
Showing 10 changed files with 35 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/sync-to-gitlab.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Sync to GitLab
Expand Down
2 changes: 1 addition & 1 deletion cmd/semantic-release/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func mergeConfigWithDefaults(defaults, conf map[string]string) {
}

//gocyclo:ignore
func cliHandler(cmd *cobra.Command, args []string) {
func cliHandler(cmd *cobra.Command, _ []string) {
logger.Printf("version: %s\n", SRVERSION)

conf, err := config.NewConfig(cmd)
Expand Down
8 changes: 4 additions & 4 deletions pkg/analyzer/commit_analyzer_wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type CommitAnalyzerServer struct {
UnimplementedCommitAnalyzerPluginServer
}

func (c *CommitAnalyzerServer) Init(ctx context.Context, request *CommitAnalyzerInit_Request) (*CommitAnalyzerInit_Response, error) {
func (c *CommitAnalyzerServer) Init(_ context.Context, request *CommitAnalyzerInit_Request) (*CommitAnalyzerInit_Response, error) {
err := c.Impl.Init(request.Config)
res := &CommitAnalyzerInit_Response{}
if err != nil {
Expand All @@ -23,15 +23,15 @@ func (c *CommitAnalyzerServer) Init(ctx context.Context, request *CommitAnalyzer
return res, nil
}

func (c *CommitAnalyzerServer) Name(ctx context.Context, request *CommitAnalyzerName_Request) (*CommitAnalyzerName_Response, error) {
func (c *CommitAnalyzerServer) Name(_ context.Context, _ *CommitAnalyzerName_Request) (*CommitAnalyzerName_Response, error) {
return &CommitAnalyzerName_Response{Name: c.Impl.Name()}, nil
}

func (c *CommitAnalyzerServer) Version(ctx context.Context, request *CommitAnalyzerVersion_Request) (*CommitAnalyzerVersion_Response, error) {
func (c *CommitAnalyzerServer) Version(_ context.Context, _ *CommitAnalyzerVersion_Request) (*CommitAnalyzerVersion_Response, error) {
return &CommitAnalyzerVersion_Response{Version: c.Impl.Version()}, nil
}

func (c *CommitAnalyzerServer) Analyze(ctx context.Context, request *AnalyzeCommits_Request) (*AnalyzeCommits_Response, error) {
func (c *CommitAnalyzerServer) Analyze(_ context.Context, request *AnalyzeCommits_Request) (*AnalyzeCommits_Response, error) {
return &AnalyzeCommits_Response{
Commits: c.Impl.Analyze(request.RawCommits),
}, nil
Expand Down
10 changes: 5 additions & 5 deletions pkg/condition/ci_condition_wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ type CIConditionServer struct {
UnimplementedCIConditionPluginServer
}

func (c *CIConditionServer) Name(ctx context.Context, request *CIName_Request) (*CIName_Response, error) {
func (c *CIConditionServer) Name(_ context.Context, _ *CIName_Request) (*CIName_Response, error) {
return &CIName_Response{Name: c.Impl.Name()}, nil
}

func (c *CIConditionServer) Version(ctx context.Context, request *CIVersion_Request) (*CIVersion_Response, error) {
func (c *CIConditionServer) Version(_ context.Context, _ *CIVersion_Request) (*CIVersion_Response, error) {
return &CIVersion_Response{Version: c.Impl.Version()}, nil
}

func (c *CIConditionServer) RunCondition(ctx context.Context, request *RunCondition_Request) (*RunCondition_Response, error) {
func (c *CIConditionServer) RunCondition(_ context.Context, request *RunCondition_Request) (*RunCondition_Response, error) {
err := c.Impl.RunCondition(request.Value)
ret := &RunCondition_Response{}
if err != nil {
Expand All @@ -29,11 +29,11 @@ func (c *CIConditionServer) RunCondition(ctx context.Context, request *RunCondit
return ret, nil
}

func (c *CIConditionServer) GetCurrentBranch(ctx context.Context, request *GetCurrentBranch_Request) (*GetCurrentBranch_Response, error) {
func (c *CIConditionServer) GetCurrentBranch(_ context.Context, _ *GetCurrentBranch_Request) (*GetCurrentBranch_Response, error) {
return &GetCurrentBranch_Response{Value: c.Impl.GetCurrentBranch()}, nil
}

func (c *CIConditionServer) GetCurrentSHA(ctx context.Context, request *GetCurrentSHA_Request) (*GetCurrentSHA_Response, error) {
func (c *CIConditionServer) GetCurrentSHA(_ context.Context, _ *GetCurrentSHA_Request) (*GetCurrentSHA_Response, error) {
return &GetCurrentSHA_Response{Value: c.Impl.GetCurrentSHA()}, nil
}

Expand Down
8 changes: 4 additions & 4 deletions pkg/generator/changelog_generator_wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type ChangelogGeneratorServer struct {
UnimplementedChangelogGeneratorPluginServer
}

func (c *ChangelogGeneratorServer) Init(ctx context.Context, request *ChangelogGeneratorInit_Request) (*ChangelogGeneratorInit_Response, error) {
func (c *ChangelogGeneratorServer) Init(_ context.Context, request *ChangelogGeneratorInit_Request) (*ChangelogGeneratorInit_Response, error) {
err := c.Impl.Init(request.Config)
res := &ChangelogGeneratorInit_Response{}
if err != nil {
Expand All @@ -21,15 +21,15 @@ func (c *ChangelogGeneratorServer) Init(ctx context.Context, request *ChangelogG
return res, nil
}

func (c *ChangelogGeneratorServer) Name(ctx context.Context, request *ChangelogGeneratorName_Request) (*ChangelogGeneratorName_Response, error) {
func (c *ChangelogGeneratorServer) Name(_ context.Context, _ *ChangelogGeneratorName_Request) (*ChangelogGeneratorName_Response, error) {
return &ChangelogGeneratorName_Response{Name: c.Impl.Name()}, nil
}

func (c *ChangelogGeneratorServer) Version(ctx context.Context, request *ChangelogGeneratorVersion_Request) (*ChangelogGeneratorVersion_Response, error) {
func (c *ChangelogGeneratorServer) Version(_ context.Context, _ *ChangelogGeneratorVersion_Request) (*ChangelogGeneratorVersion_Response, error) {
return &ChangelogGeneratorVersion_Response{Version: c.Impl.Version()}, nil
}

func (c *ChangelogGeneratorServer) Generate(ctx context.Context, request *GenerateChangelog_Request) (*GenerateChangelog_Response, error) {
func (c *ChangelogGeneratorServer) Generate(_ context.Context, request *GenerateChangelog_Request) (*GenerateChangelog_Response, error) {
return &GenerateChangelog_Response{
Changelog: c.Impl.Generate(request.Config),
}, nil
Expand Down
10 changes: 5 additions & 5 deletions pkg/hooks/hooks_wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type Server struct {
UnimplementedHooksPluginServer
}

func (h *Server) Init(ctx context.Context, request *HooksInit_Request) (*HooksInit_Response, error) {
func (h *Server) Init(_ context.Context, request *HooksInit_Request) (*HooksInit_Response, error) {
err := h.Impl.Init(request.Config)
res := &HooksInit_Response{}
if err != nil {
Expand All @@ -21,15 +21,15 @@ func (h *Server) Init(ctx context.Context, request *HooksInit_Request) (*HooksIn
return res, nil
}

func (h *Server) Name(ctx context.Context, request *HooksName_Request) (*HooksName_Response, error) {
func (h *Server) Name(_ context.Context, _ *HooksName_Request) (*HooksName_Response, error) {
return &HooksName_Response{Name: h.Impl.Name()}, nil
}

func (h *Server) Version(ctx context.Context, request *HooksVersion_Request) (*HooksVersion_Response, error) {
func (h *Server) Version(_ context.Context, _ *HooksVersion_Request) (*HooksVersion_Response, error) {
return &HooksVersion_Response{Version: h.Impl.Version()}, nil
}

func (h *Server) Success(ctx context.Context, request *SuccessHook_Request) (*SuccessHook_Response, error) {
func (h *Server) Success(_ context.Context, request *SuccessHook_Request) (*SuccessHook_Response, error) {
err := h.Impl.Success(request.Config)
res := &SuccessHook_Response{}
if err != nil {
Expand All @@ -38,7 +38,7 @@ func (h *Server) Success(ctx context.Context, request *SuccessHook_Request) (*Su
return res, nil
}

func (h *Server) NoRelease(ctx context.Context, request *NoReleaseHook_Request) (*NoReleaseHook_Response, error) {
func (h *Server) NoRelease(_ context.Context, request *NoReleaseHook_Request) (*NoReleaseHook_Response, error) {
err := h.Impl.NoRelease(request.Config)
res := &NoReleaseHook_Response{}
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions pkg/plugin/grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type GRPCWrapper struct {
plugin.NetRPCUnsupportedPlugin
}

func (p *GRPCWrapper) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error {
func (p *GRPCWrapper) GRPCServer(_ *plugin.GRPCBroker, s *grpc.Server) error {
switch p.Type {
case analyzer.CommitAnalyzerPluginName:
analyzer.RegisterCommitAnalyzerPluginServer(s, &analyzer.CommitAnalyzerServer{
Expand Down Expand Up @@ -52,7 +52,7 @@ func (p *GRPCWrapper) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) erro
return nil
}

func (p *GRPCWrapper) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error) {
func (p *GRPCWrapper) GRPCClient(_ context.Context, _ *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error) {
switch p.Type {
case analyzer.CommitAnalyzerPluginName:
return &analyzer.CommitAnalyzerClient{
Expand Down
14 changes: 7 additions & 7 deletions pkg/provider/wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type Server struct {
UnimplementedProviderPluginServer
}

func (s *Server) Init(ctx context.Context, request *ProviderInit_Request) (*ProviderInit_Response, error) {
func (s *Server) Init(_ context.Context, request *ProviderInit_Request) (*ProviderInit_Response, error) {
err := s.Impl.Init(request.Config)
res := &ProviderInit_Response{}
if err != nil {
Expand All @@ -23,39 +23,39 @@ func (s *Server) Init(ctx context.Context, request *ProviderInit_Request) (*Prov
return res, nil
}

func (s *Server) Name(ctx context.Context, request *ProviderName_Request) (*ProviderName_Response, error) {
func (s *Server) Name(_ context.Context, _ *ProviderName_Request) (*ProviderName_Response, error) {
return &ProviderName_Response{Name: s.Impl.Name()}, nil
}

func (s *Server) Version(ctx context.Context, request *ProviderVersion_Request) (*ProviderVersion_Response, error) {
func (s *Server) Version(_ context.Context, _ *ProviderVersion_Request) (*ProviderVersion_Response, error) {
return &ProviderVersion_Response{Version: s.Impl.Version()}, nil
}

func (s *Server) GetInfo(ctx context.Context, request *GetInfo_Request) (*GetInfo_Response, error) {
func (s *Server) GetInfo(_ context.Context, _ *GetInfo_Request) (*GetInfo_Response, error) {
info, err := s.Impl.GetInfo()
if err != nil {
return &GetInfo_Response{Error: err.Error()}, nil
}
return &GetInfo_Response{Info: info}, nil
}

func (s *Server) GetCommits(ctx context.Context, request *GetCommits_Request) (*GetCommits_Response, error) {
func (s *Server) GetCommits(_ context.Context, request *GetCommits_Request) (*GetCommits_Response, error) {
commits, err := s.Impl.GetCommits(request.FromSha, request.ToSha)
if err != nil {
return &GetCommits_Response{Error: err.Error()}, nil
}
return &GetCommits_Response{RawCommits: commits}, nil
}

func (s *Server) GetReleases(ctx context.Context, request *GetReleases_Request) (*GetReleases_Response, error) {
func (s *Server) GetReleases(_ context.Context, request *GetReleases_Request) (*GetReleases_Response, error) {
releases, err := s.Impl.GetReleases(request.Regexp)
if err != nil {
return &GetReleases_Response{Error: err.Error()}, nil
}
return &GetReleases_Response{Releases: releases}, nil
}

func (s *Server) CreateRelease(ctx context.Context, request *CreateRelease_Request) (*CreateRelease_Response, error) {
func (s *Server) CreateRelease(_ context.Context, request *CreateRelease_Request) (*CreateRelease_Response, error) {
err := s.Impl.CreateRelease(request.Config)
res := &CreateRelease_Response{}
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/updater/updater_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func (tfu *testFileUpdater) ForFiles() string {
return "package\\.json"
}

func (tfu *testFileUpdater) Apply(file, newVersion string) error {
func (tfu *testFileUpdater) Apply(_, newVersion string) error {
tfu.req.Equal(newVersion, tfu.nVer, "invalid version")
return nil
}
Expand Down
10 changes: 5 additions & 5 deletions pkg/updater/updater_wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type FilesUpdaterServer struct {
UnimplementedFilesUpdaterPluginServer
}

func (f *FilesUpdaterServer) Init(ctx context.Context, request *FilesUpdaterInit_Request) (*FilesUpdaterInit_Response, error) {
func (f *FilesUpdaterServer) Init(_ context.Context, request *FilesUpdaterInit_Request) (*FilesUpdaterInit_Response, error) {
err := f.Impl.Init(request.Config)
res := &FilesUpdaterInit_Response{}
if err != nil {
Expand All @@ -21,19 +21,19 @@ func (f *FilesUpdaterServer) Init(ctx context.Context, request *FilesUpdaterInit
return res, nil
}

func (f *FilesUpdaterServer) Name(ctx context.Context, request *FilesUpdaterName_Request) (*FilesUpdaterName_Response, error) {
func (f *FilesUpdaterServer) Name(_ context.Context, _ *FilesUpdaterName_Request) (*FilesUpdaterName_Response, error) {
return &FilesUpdaterName_Response{Name: f.Impl.Name()}, nil
}

func (f *FilesUpdaterServer) Version(ctx context.Context, request *FilesUpdaterVersion_Request) (*FilesUpdaterVersion_Response, error) {
func (f *FilesUpdaterServer) Version(_ context.Context, _ *FilesUpdaterVersion_Request) (*FilesUpdaterVersion_Response, error) {
return &FilesUpdaterVersion_Response{Version: f.Impl.Version()}, nil
}

func (f *FilesUpdaterServer) ForFiles(ctx context.Context, request *FilesUpdaterForFiles_Request) (*FilesUpdaterForFiles_Response, error) {
func (f *FilesUpdaterServer) ForFiles(_ context.Context, _ *FilesUpdaterForFiles_Request) (*FilesUpdaterForFiles_Response, error) {
return &FilesUpdaterForFiles_Response{Files: f.Impl.ForFiles()}, nil
}

func (f *FilesUpdaterServer) Apply(ctx context.Context, request *FilesUpdaterApply_Request) (*FilesUpdaterApply_Response, error) {
func (f *FilesUpdaterServer) Apply(_ context.Context, request *FilesUpdaterApply_Request) (*FilesUpdaterApply_Response, error) {
err := f.Impl.Apply(request.File, request.NewVersion)
res := &FilesUpdaterApply_Response{}
if err != nil {
Expand Down

0 comments on commit d2be812

Please sign in to comment.