Skip to content
Merged
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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ scratch*
*.json
!devcontainer.json

# Committed Go dataflow fixtures, generated by cango from the .go.txt sources beside them (see the
# README there).
!tests/resources/go/dataflow/*.json

# Blessed TS unit-test fixtures: analysis.json at each level, generated by the pinned
# codeanalyzer-typescript from tests/resources/typescript/application (see the README there), and
# the sample app's own manifests, which the analyzer's artifact layer reads.
Expand Down
1 change: 1 addition & 0 deletions tests/resources/go/dataflow/four_type_kinds.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"identity_version":2,"schema_version":"2.0.0","language":"go","max_level":1,"analyzer":{"name":"codeanalyzer-go","version":"0.3.0"},"application":{"identity_version":2,"application_name":"kinds","identity_namespace":"kinds","id":"can://kinds/kinds","kind":"application","symbol_table":{"kinds.go":{"id":"can://kinds/kinds/go/kinds.go","kind":"module","span":{"start":[1,1],"end":[23,1],"bytes":[0,651]},"package":"kinds","source":"// Package kinds declares one of each of the four type kinds the analyzer emits,\n// which is what the SDK's GoType.kind Literal has to accept (python-sdk#436).\npackage kinds\n\n// S is a struct.\ntype S struct{ N int }\n\n// I is an interface.\ntype I interface{ M() int }\n\n// Celsius is a *defined* type (a new named type over an existing one).\ntype Celsius float64\n\n// Alias is an *alias* (the same type under a second name) -- the kind that made\n// GoAnalysis(**doc) raise before #436.\ntype Alias = int\n\n// M satisfies I.\nfunc (s S) M() int { return s.N }\n\n// Use keeps every declaration reachable.\nfunc Use(c Celsius, a Alias) int { return int(c) + a }\n","imports":[],"types":{"Alias":{"id":"can://kinds/kinds/go/kinds.go/example.com/kinds.Alias","kind":"alias","span":{"start":[16,1],"end":[16,17],"bytes":[483,499]},"callables":{}},"Celsius":{"id":"can://kinds/kinds/go/kinds.go/example.com/kinds.Celsius","kind":"defined","span":{"start":[12,1],"end":[12,21],"bytes":[340,360]},"callables":{}},"I":{"id":"can://kinds/kinds/go/kinds.go/example.com/kinds.I","kind":"interface","span":{"start":[9,1],"end":[9,28],"bytes":[239,266]},"callables":{"example.com/kinds.I.M":{"id":"can://kinds/kinds/go/kinds.go/example.com/kinds.I/example.com/kinds.I.M","kind":"method","span":{"start":[9,1],"end":[9,28],"bytes":[239,266]},"signature":"example.com/kinds.I.M","parameters":[],"return_type":"int","body":{}}}},"S":{"id":"can://kinds/kinds/go/kinds.go/example.com/kinds.S","kind":"struct","span":{"start":[6,1],"end":[6,23],"bytes":[193,215]},"callables":{"example.com/kinds.S.M":{"id":"can://kinds/kinds/go/kinds.go/example.com/kinds.S/example.com/kinds.S.M","kind":"method","span":{"start":[19,1],"end":[19,34],"bytes":[519,552]},"signature":"example.com/kinds.S.M","parameters":[],"return_type":"int","metrics":{"cyclomatic":1},"body":{}}},"fields":{"N":{"id":"can://kinds/kinds/go/kinds.go/example.com/kinds.S/N","kind":"field","type":"int","span":{"start":[6,1],"end":[6,23],"bytes":[193,215]}}}}},"functions":{"example.com/kinds.Use":{"id":"can://kinds/kinds/go/kinds.go/example.com/kinds.Use","kind":"function","span":{"start":[22,1],"end":[22,55],"bytes":[596,650]},"signature":"example.com/kinds.Use","parameters":[{"name":"c","type":"example.com/kinds.Celsius","span":{"start":[22,1],"end":[22,55],"bytes":[596,650]}},{"name":"a","type":"example.com/kinds.Alias","span":{"start":[22,1],"end":[22,55],"bytes":[596,650]}}],"return_type":"int","metrics":{"cyclomatic":1},"body":{"22:43":{"kind":"call","id":"can://kinds/kinds/go/kinds.go/example.com/kinds.Use@22:43","span":{"start":[22,43],"end":[22,49],"bytes":[638,644]},"callee":null}}}},"content_hash":"74bfd3702a7b11191663ddd3bb7033316a3bd090977046f61ab491b4f9d0f467"}},"call_graph":[]}}
1 change: 1 addition & 0 deletions tests/resources/go/dataflow/httpsql_l4.json

Large diffs are not rendered by default.

Loading