Skip to content

Commit 8ae262d

Browse files
chore: fix linter errors
1 parent 6bdee23 commit 8ae262d

File tree

10 files changed

+35
-35
lines changed

10 files changed

+35
-35
lines changed

.github/workflows/sync-to-gitlab.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
sync:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v3
11+
- uses: actions/checkout@v4
1212
with:
1313
fetch-depth: 0
1414
- name: Sync to GitLab

cmd/semantic-release/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ func mergeConfigWithDefaults(defaults, conf map[string]string) {
7979
}
8080

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

8585
conf, err := config.NewConfig(cmd)

pkg/analyzer/commit_analyzer_wrapper.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ type CommitAnalyzerServer struct {
1414
UnimplementedCommitAnalyzerPluginServer
1515
}
1616

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

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

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

34-
func (c *CommitAnalyzerServer) Analyze(ctx context.Context, request *AnalyzeCommits_Request) (*AnalyzeCommits_Response, error) {
34+
func (c *CommitAnalyzerServer) Analyze(_ context.Context, request *AnalyzeCommits_Request) (*AnalyzeCommits_Response, error) {
3535
return &AnalyzeCommits_Response{
3636
Commits: c.Impl.Analyze(request.RawCommits),
3737
}, nil

pkg/condition/ci_condition_wrapper.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ type CIConditionServer struct {
1212
UnimplementedCIConditionPluginServer
1313
}
1414

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

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

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

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

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

pkg/generator/changelog_generator_wrapper.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ type ChangelogGeneratorServer struct {
1212
UnimplementedChangelogGeneratorPluginServer
1313
}
1414

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

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

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

32-
func (c *ChangelogGeneratorServer) Generate(ctx context.Context, request *GenerateChangelog_Request) (*GenerateChangelog_Response, error) {
32+
func (c *ChangelogGeneratorServer) Generate(_ context.Context, request *GenerateChangelog_Request) (*GenerateChangelog_Response, error) {
3333
return &GenerateChangelog_Response{
3434
Changelog: c.Impl.Generate(request.Config),
3535
}, nil

pkg/hooks/hooks_wrapper.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ type Server struct {
1212
UnimplementedHooksPluginServer
1313
}
1414

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

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

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

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

41-
func (h *Server) NoRelease(ctx context.Context, request *NoReleaseHook_Request) (*NoReleaseHook_Response, error) {
41+
func (h *Server) NoRelease(_ context.Context, request *NoReleaseHook_Request) (*NoReleaseHook_Response, error) {
4242
err := h.Impl.NoRelease(request.Config)
4343
res := &NoReleaseHook_Response{}
4444
if err != nil {

pkg/plugin/grpc.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ type GRPCWrapper struct {
2020
plugin.NetRPCUnsupportedPlugin
2121
}
2222

23-
func (p *GRPCWrapper) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error {
23+
func (p *GRPCWrapper) GRPCServer(_ *plugin.GRPCBroker, s *grpc.Server) error {
2424
switch p.Type {
2525
case analyzer.CommitAnalyzerPluginName:
2626
analyzer.RegisterCommitAnalyzerPluginServer(s, &analyzer.CommitAnalyzerServer{
@@ -52,7 +52,7 @@ func (p *GRPCWrapper) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) erro
5252
return nil
5353
}
5454

55-
func (p *GRPCWrapper) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error) {
55+
func (p *GRPCWrapper) GRPCClient(_ context.Context, _ *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error) {
5656
switch p.Type {
5757
case analyzer.CommitAnalyzerPluginName:
5858
return &analyzer.CommitAnalyzerClient{

pkg/provider/wrapper.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ type Server struct {
1414
UnimplementedProviderPluginServer
1515
}
1616

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

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

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

34-
func (s *Server) GetInfo(ctx context.Context, request *GetInfo_Request) (*GetInfo_Response, error) {
34+
func (s *Server) GetInfo(_ context.Context, _ *GetInfo_Request) (*GetInfo_Response, error) {
3535
info, err := s.Impl.GetInfo()
3636
if err != nil {
3737
return &GetInfo_Response{Error: err.Error()}, nil
3838
}
3939
return &GetInfo_Response{Info: info}, nil
4040
}
4141

42-
func (s *Server) GetCommits(ctx context.Context, request *GetCommits_Request) (*GetCommits_Response, error) {
42+
func (s *Server) GetCommits(_ context.Context, request *GetCommits_Request) (*GetCommits_Response, error) {
4343
commits, err := s.Impl.GetCommits(request.FromSha, request.ToSha)
4444
if err != nil {
4545
return &GetCommits_Response{Error: err.Error()}, nil
4646
}
4747
return &GetCommits_Response{RawCommits: commits}, nil
4848
}
4949

50-
func (s *Server) GetReleases(ctx context.Context, request *GetReleases_Request) (*GetReleases_Response, error) {
50+
func (s *Server) GetReleases(_ context.Context, request *GetReleases_Request) (*GetReleases_Response, error) {
5151
releases, err := s.Impl.GetReleases(request.Regexp)
5252
if err != nil {
5353
return &GetReleases_Response{Error: err.Error()}, nil
5454
}
5555
return &GetReleases_Response{Releases: releases}, nil
5656
}
5757

58-
func (s *Server) CreateRelease(ctx context.Context, request *CreateRelease_Request) (*CreateRelease_Response, error) {
58+
func (s *Server) CreateRelease(_ context.Context, request *CreateRelease_Request) (*CreateRelease_Response, error) {
5959
err := s.Impl.CreateRelease(request.Config)
6060
res := &CreateRelease_Response{}
6161
if err != nil {

pkg/updater/updater_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func (tfu *testFileUpdater) ForFiles() string {
2727
return "package\\.json"
2828
}
2929

30-
func (tfu *testFileUpdater) Apply(file, newVersion string) error {
30+
func (tfu *testFileUpdater) Apply(_, newVersion string) error {
3131
tfu.req.Equal(newVersion, tfu.nVer, "invalid version")
3232
return nil
3333
}

pkg/updater/updater_wrapper.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ type FilesUpdaterServer struct {
1212
UnimplementedFilesUpdaterPluginServer
1313
}
1414

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

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

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

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

36-
func (f *FilesUpdaterServer) Apply(ctx context.Context, request *FilesUpdaterApply_Request) (*FilesUpdaterApply_Response, error) {
36+
func (f *FilesUpdaterServer) Apply(_ context.Context, request *FilesUpdaterApply_Request) (*FilesUpdaterApply_Response, error) {
3737
err := f.Impl.Apply(request.File, request.NewVersion)
3838
res := &FilesUpdaterApply_Response{}
3939
if err != nil {

0 commit comments

Comments
 (0)