Skip to content

Commit 8020b0f

Browse files
authored
fix(ruby): add file path (fanal#269)
1 parent fa57fce commit 8020b0f

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

analyzer/language/ruby/gemspec/gemspec.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ func (a gemspecLibraryAnalyzer) Analyze(target analyzer.AnalysisTarget) (*analyz
3737
FilePath: target.FilePath,
3838
Libraries: []types.LibraryInfo{
3939
{
40-
Library: parsedLib,
40+
FilePath: target.FilePath,
41+
Library: parsedLib,
4142
},
4243
},
4344
},

analyzer/language/ruby/gemspec/gemspec_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ func Test_gemspecLibraryAnalyzer_Analyze(t *testing.T) {
2828
FilePath: "testdata/multiple_licenses.gemspec",
2929
Libraries: []types.LibraryInfo{
3030
{
31+
FilePath: "testdata/multiple_licenses.gemspec",
3132
Library: godeptypes.Library{
3233
Name: "test-unit",
3334
Version: "3.3.7",

0 commit comments

Comments
 (0)