Skip to content

Commit d221109

Browse files
committed
Fixed linting issues
1 parent a2ad520 commit d221109

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

services/scan_service.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -875,13 +875,13 @@ func (s *scanService) ScanSBOMWithoutSaving(ctx context.Context, bom *cyclonedx.
875875
}, nil
876876
}
877877

878-
func (s *scanService) FetchOpenVexFromGitHub(ctx context.Context, targetUrl string) (vexReports []*normalize.VexReportOpenVEX, err error) {
878+
func (s *scanService) FetchOpenVexFromGitHub(ctx context.Context, targetURL string) (vexReports []*normalize.VexReportOpenVEX, err error) {
879879
client := newGitHubClient()
880880
githubDomain := "https://github.com"
881-
if !strings.HasPrefix(targetUrl, githubDomain) {
881+
if !strings.HasPrefix(targetURL, githubDomain) {
882882
return nil, fmt.Errorf("invalid github repository url")
883883
}
884-
owner, repo, err := ParseGitHubURL(targetUrl)
884+
owner, repo, err := ParseGitHubURL(targetURL)
885885
if err != nil {
886886
return nil, err
887887
}
@@ -936,7 +936,7 @@ func (s *scanService) FetchOpenVexFromGitHub(ctx context.Context, targetUrl stri
936936

937937
vexReports = append(vexReports, &normalize.VexReportOpenVEX{
938938
Report: &openVEX,
939-
Source: targetUrl,
939+
Source: targetURL,
940940
})
941941
}
942942
return vexReports, nil

services/scan_service_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -398,11 +398,11 @@ func TestFetchOpenVexFromGitHub(t *testing.T) {
398398

399399
ts := time.Date(2026, time.May, 20, 12, 0, 0, 0, time.UTC)
400400
var id, author string
401-
switch {
402-
case filePath == "vex/vex1.json":
401+
switch filePath {
402+
case "vex/vex1.json":
403403
id = "openvex-first"
404404
author = "author-one"
405-
case filePath == "vex/vex2.json":
405+
case "vex/vex2.json":
406406
id = "openvex-second"
407407
author = "author-two"
408408
default:

0 commit comments

Comments
 (0)