Skip to content

Commit 5f57914

Browse files
lint issues fixed
1 parent bdfa011 commit 5f57914

3 files changed

Lines changed: 4 additions & 10 deletions

File tree

internal/commands/result.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ const (
113113
ScaExcludeResultTypesParam = "exclude-result-types"
114114
noFileForScorecardResultString = "Issue Found in your GitHub repository"
115115
CliType = "cli"
116-
artifactLocationUriString = "This alert has no associated file"
116+
artifactLocationURIString = "This alert has no associated file"
117117
)
118118

119119
var (
@@ -2685,7 +2685,7 @@ func parseSarifResultsSscs(result *wrappers.ScanResult, scanResults []wrappers.S
26852685

26862686
trimOsSeparatorFromFileName(result)
26872687
if result.Type == commonParams.SCSScorecardType && result.ScanResultData.Filename == noFileForScorecardResultString {
2688-
scanLocation.PhysicalLocation.ArtifactLocation.URI = artifactLocationUriString
2688+
scanLocation.PhysicalLocation.ArtifactLocation.URI = artifactLocationURIString
26892689
scanLocation.PhysicalLocation.ArtifactLocation.Description = &wrappers.SarifMessage{}
26902690
scanLocation.PhysicalLocation.ArtifactLocation.Description.Text = result.ScanResultData.Filename
26912691
} else {

internal/commands/result_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -895,7 +895,7 @@ func assertTypePresentSarif(t *testing.T, resultType string, expectedResultTypeC
895895
fmt.Sprintf("Expected %s result count to be %d, but found %d results", resultType, expectedResultTypeCount, actualResultTypeCount))
896896
}
897897

898-
func assertUriNonEmpty(t *testing.T) {
898+
func assertURINonEmpty(t *testing.T) {
899899
reportBytes, err := os.ReadFile(fileName + "." + printer.FormatSarif)
900900
var scanResults *wrappers.SarifResultsCollection
901901
err = json.Unmarshal(reportBytes, &scanResults)
@@ -1401,7 +1401,7 @@ func TestRunGetResultsByScanIdSarifFormat_SCSFlagEnabled_SCSNonEmpty_URI_Present
14011401
execCmdNilAssertion(t, "results", "show", "--scan-id", "MOCK", "--report-format", "sarif")
14021402
assertTypePresentSarif(t, params.SCSScorecardType, 1)
14031403
assertTypePresentSarif(t, params.SCSSecretDetectionType, 2)
1404-
assertUriNonEmpty(t)
1404+
assertURINonEmpty(t)
14051405
removeFileBySuffix(t, printer.FormatSarif)
14061406
mock.SetScsMockVarsToDefault()
14071407
}

internal/wrappers/mock/results-mock.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -306,15 +306,9 @@ func (r ResultsMockWrapper) GetAllResultsByScanID(params map[string]string) (
306306
Nodes: []*wrappers.ScanResultNode{
307307
{
308308
FileName: "dummy-file-name-4",
309-
Line: 10,
310-
Column: 10,
311-
Length: 20,
312309
},
313310
{
314311
FileName: "dummy-file-name-4",
315-
Line: 11,
316-
Column: 3,
317-
Length: 10,
318312
},
319313
},
320314
},

0 commit comments

Comments
 (0)