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

Latest vndr picks up lots more stuff (due to .c file inclusion) #71

Open
ijc opened this issue Apr 30, 2018 · 2 comments
Open

Latest vndr picks up lots more stuff (due to .c file inclusion) #71

ijc opened this issue Apr 30, 2018 · 2 comments

Comments

@ijc
Copy link
Contributor

ijc commented Apr 30, 2018

Rerunning vndr on containerd with the latest version picked up a lot of extra stuff, I think because of #69/#70. Is this expected or is it going further than was intended?

See containerd/containerd@623407a which has stat of:

vendor/github.com/docker/docker/contrib/README.md             |    4 +
 vendor/github.com/docker/docker/contrib/nnp-test/nnp-test.c   |   10 +
 vendor/github.com/docker/docker/contrib/syscall-test/acct.c   |   16 +
 vendor/github.com/docker/docker/contrib/syscall-test/exit32.s |    7 +
 vendor/github.com/docker/docker/contrib/syscall-test/ns.c     |   63 ++++
 vendor/github.com/docker/docker/contrib/syscall-test/raw.c    |   14 +
 vendor/github.com/docker/docker/contrib/syscall-test/setgid.c |   11 +
 vendor/github.com/docker/docker/contrib/syscall-test/setuid.c |   11 +
 vendor/github.com/docker/docker/contrib/syscall-test/socket.c |   30 ++
 vendor/github.com/docker/docker/contrib/syscall-test/userns.c |   63 ++++
 vendor/golang.org/x/crypto/otr/libotr_test_helper.c           |  197 +++++++++++
 vendor/golang.org/x/crypto/otr/otr.go                         | 1415 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 vendor/golang.org/x/crypto/otr/smp.go                         |  572 ++++++++++++++++++++++++++++++++
 vendor/golang.org/x/crypto/ssh/test/doc.go                    |    7 +
 vendor/golang.org/x/crypto/ssh/test/sshd_test_pw.c            |  173 ++++++++++
 vendor/golang.org/x/sys/windows/svc/event.go                  |   48 +++
 vendor/golang.org/x/sys/windows/svc/go12.c                    |   24 ++
 vendor/golang.org/x/sys/windows/svc/go12.go                   |   11 +
 vendor/golang.org/x/sys/windows/svc/go13.go                   |   31 ++
 vendor/golang.org/x/sys/windows/svc/security.go               |   62 ++++
 vendor/golang.org/x/sys/windows/svc/service.go                |  363 +++++++++++++++++++++
 vendor/golang.org/x/sys/windows/svc/sys_386.s                 |   68 ++++
 vendor/golang.org/x/sys/windows/svc/sys_amd64.s               |   42 +++
 vendor/k8s.io/kubernetes/build/README.md                      |  110 +++++++
 vendor/k8s.io/kubernetes/build/pause/orphan.c                 |   36 ++
 vendor/k8s.io/kubernetes/build/pause/pause.c                  |   68 ++++
 26 files changed, 3456 insertions(+)
@dmcgowan
Copy link

Seems this change is to accommodate a case where someone was directly including a .c file from a directory with no .h file using cgo. See https://github.com/leslie-wang/go-mediainfo/blob/master/mediainfo/mediainfo.go#L7.

While including more unused stuff is not ideal, since cgo supports this case vndr should as well. Parsing the cgo includes would be too ugly :)

@ijc
Copy link
Contributor Author

ijc commented Apr 30, 2018

Ah yes, I forgot that the cgo stuff would be opaque to the Go AST.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants