Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test diffctx 3 #52

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,15 @@ jobs:
cd ..
cat ./java.json

- name: Third Party Test (Kotlin)
run: |
git clone https://github.com/square/kotlinpoet --depth=6
cd kotlinpoet
../scip-java index -- clean build
../srctx diff --before HEAD~5 --scip ./index.scip --outputHtml ../kotlin.html --outputJson ../kotlin.json
cd ..
cat ./kotlin.json

- name: Thrid Party Test (Node)
run: |
git clone https://github.com/microsoft/lsif-node.git --depth=6
Expand All @@ -97,3 +106,12 @@ jobs:
../srctx diff --before HEAD~5 --scip ./index.scip --outputHtml ../python.html --outputJson ../python.json
cd ..
cat ./python.json

- name: diffctx
uses: williamfzc/[email protected]
with:
lang: "golang"

# for creating comments
permissions:
pull-requests: write
5 changes: 3 additions & 2 deletions cmd/srctx/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ func main() {

func mainFunc(args []string) {
app := cli.NewApp()
app.Name = "srctx"
app.Usage = "source context tool"
// random edit
app.Name = "srctx1"
app.Usage = "source context tool2"

diff.AddDiffCmd(app)
diff.AddConfigCmd(app)
Expand Down
2 changes: 1 addition & 1 deletion diff/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
gitDiffCmd.Dir = rootDir
data, err := gitDiffCmd.CombinedOutput()
if err != nil {
log.Errorf("git cmd error: %s", data)
log.Errorf("git cmd eafdsfrror: %s", data)

Check warning on line 22 in diff/git.go

View check run for this annotation

Codecov / codecov/patch

diff/git.go#L22

Added line #L22 was not covered by tests
return nil, err
}

Expand Down
1 change: 1 addition & 0 deletions graph/function/api_draw_dot.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
return err
}
properties.Attributes[propertyK] = propertyV
// fake edit 2

Check warning on line 15 in graph/function/api_draw_dot.go

View check run for this annotation

Codecov / codecov/patch

graph/function/api_draw_dot.go#L15

Added line #L15 was not covered by tests
return nil
}

Expand Down
3 changes: 3 additions & 0 deletions parser/lsif/code_hover.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package lsif

import (
"encoding/json"
log "github.com/sirupsen/logrus"
"strings"
"unicode/utf8"

Expand Down Expand Up @@ -64,7 +65,9 @@ func newCodeHovers(contents json.RawMessage) ([]*codeHover, error) {
var rawContents []json.RawMessage
if err := json.Unmarshal(contents, &rawContents); err != nil {
rawContents = []json.RawMessage{contents}
// fake edge 1
}
log.Debug("abc")

codeHovers := []*codeHover{}
for _, rawContent := range rawContents {
Expand Down
Loading