Skip to content

Commit ca0fb3a

Browse files
fix: tests and DeepSource issues
Signed-off-by: Sourya Vatsyayan <sourya@deepsource.io>
1 parent a299363 commit ca0fb3a

4 files changed

Lines changed: 12 additions & 11 deletions

File tree

command/config/validate/validate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ func extractDSConfigPath() (string, error) {
132132
return "", errors.New("Error occured while looking for DeepSource config file. Exiting...")
133133
} else {
134134
// If found, use this as configpath
135-
configPath = filepath.Join(path, "/.deepsource.toml")
135+
configPath = filepath.Join(path, ".deepsource.toml")
136136
}
137137
}
138138
return configPath, nil

command/issues/list/list_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"testing"
99

1010
"github.com/deepsourcelabs/cli/deepsource/issues"
11+
"github.com/google/go-cmp/cmp"
1112
)
1213

1314
// Helper function to read issues from a file.
@@ -98,7 +99,7 @@ func TestListSARIF(t *testing.T) {
9899
_ = os.Remove("./testdata/exported.sarif")
99100

100101
if !reflect.DeepEqual(got, want) {
101-
t.Errorf("got: %v; want: %v\n", got, want)
102+
t.Errorf("diff: %s\n", cmp.Diff(got, want))
102103
}
103104
})
104105

@@ -121,7 +122,7 @@ func TestListSARIF(t *testing.T) {
121122
_ = os.Remove("./testdata/exported_multi.sarif")
122123

123124
if !reflect.DeepEqual(got, want) {
124-
t.Errorf("got: %v; want: %v\n", got, want)
125+
t.Errorf("diff: %s\n", cmp.Diff(got, want))
125126
}
126127
})
127128
}

command/issues/list/testdata/sarif/test.sarif

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
{
66
"tool": {
77
"driver": {
8-
"informationUri": "https://deepsource.com/directory/analyzers/go",
8+
"informationUri": "https://deepsource.com/directory/go",
99
"name": "DeepSource Go Analyzer",
1010
"rules": [
1111
{
@@ -15,7 +15,7 @@
1515
"fullDescription": {
1616
"text": ""
1717
},
18-
"helpUri": "https://deepsource.com/directory/analyzers/go/issues/RVV-B0013",
18+
"helpUri": "https://deepsource.com/directory/go/issues/RVV-B0013",
1919
"properties": {
2020
"category": "",
2121
"recommended": ""

command/issues/list/testdata/sarif/test_multi.sarif

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
{
66
"tool": {
77
"driver": {
8-
"informationUri": "https://deepsource.com/directory/analyzers/go",
8+
"informationUri": "https://deepsource.com/directory/go",
99
"name": "DeepSource Go Analyzer",
1010
"rules": [
1111
{
@@ -15,7 +15,7 @@
1515
"fullDescription": {
1616
"text": ""
1717
},
18-
"helpUri": "https://deepsource.com/directory/analyzers/go/issues/RVV-B0013",
18+
"helpUri": "https://deepsource.com/directory/go/issues/RVV-B0013",
1919
"properties": {
2020
"category": "",
2121
"recommended": ""
@@ -74,7 +74,7 @@
7474
{
7575
"tool": {
7676
"driver": {
77-
"informationUri": "https://deepsource.com/directory/analyzers/docker",
77+
"informationUri": "https://deepsource.com/directory/docker",
7878
"name": "DeepSource Docker Analyzer",
7979
"rules": [
8080
{
@@ -84,7 +84,7 @@
8484
"fullDescription": {
8585
"text": ""
8686
},
87-
"helpUri": "https://deepsource.com/directory/analyzers/docker/issues/DOK-DL3025",
87+
"helpUri": "https://deepsource.com/directory/docker/issues/DOK-DL3025",
8888
"properties": {
8989
"category": "",
9090
"recommended": ""
@@ -121,7 +121,7 @@
121121
{
122122
"tool": {
123123
"driver": {
124-
"informationUri": "https://deepsource.com/directory/analyzers/python",
124+
"informationUri": "https://deepsource.com/directory/python",
125125
"name": "DeepSource Python Analyzer",
126126
"rules": [
127127
{
@@ -131,7 +131,7 @@
131131
"fullDescription": {
132132
"text": ""
133133
},
134-
"helpUri": "https://deepsource.com/directory/analyzers/python/issues/PY-W2000",
134+
"helpUri": "https://deepsource.com/directory/python/issues/PY-W2000",
135135
"properties": {
136136
"category": "",
137137
"recommended": ""

0 commit comments

Comments
 (0)