ribice / glice Goto Github PK
View Code? Open in Web Editor NEWGo license and dependency checker
Home Page: https://www.ribice.ba/glice/
License: MIT License
Go license and dependency checker
Home Page: https://www.ribice.ba/glice/
License: MIT License
TravisCI build is not passing, due to test expecting a license from GitHub's API response. Due to rate limiting, it doesn't return anything and therefore test fails.
ToDo: Mock response from GitHub API in tests to prevent such error.
When running glice in a project using go modules, not in the regular gopath you get the error:
panic: runtime error: index out of range [1] with length 1
goroutine 1 [running]:
main.main()
/home/tommy/go/src/github.com/ribice/glice/main.go:64 +0x758
I currently have glice running for a repository for about 10 minutes with no update, and its not clear to me that it has stalled or if it is fetching something slowly.
Is there a way to enable verbose logging for glice?
I'm having issues installing glice, partially because v2.0.0 for instance has been released but go.mod does not comply with what Go expects (/v2
has to be the suffix), but also all the README commands do not seem to work. I have installed other CLI tools without issues. Here's a screenshot:
As for the v2 go.mod name, see here how major versioning in Go works (not very intuitive :D): https://go.dev/blog/v2-go-modules
go install github.com/ribice/glice/[email protected]
go install: github.com/ribice/glice/[email protected]: github.com/ribice/[email protected]: invalid version: module contains a go.mod file, so major version must be compatible: should be v0 or v1, not v2
Why is it that when I use "glice -i go.mod -fmt=json -o sss.json" it does not generate the JSON file? What could be the issue?
Hi, it just crashes.
$ glice
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x13c1f1d]
goroutine 1 [running]:
main.(*deps).exists(0xc0000d5e28, 0xc000270caf, 0x16, 0xa00, 0xc000270c80)
/Users/bblay/go/src/github.com/ribice/glice/main.go:180 +0xdd
main.(*deps).getDeps(0xc0000d5e28, 0xc000182f3c, 0x18)
/Users/bblay/go/src/github.com/ribice/glice/main.go:158 +0x37d
main.main()
/Users/bblay/go/src/github.com/ribice/glice/main.go:81 +0x564
Since this is a "binary only dependency" i would personally prefer having only the binary, effectively improve my CI build time
I also suggest the awesome https://goreleaser.com/ to automate creation and publish of binaries. What do you think ?
Glice currently parses dependencies from go.mod
without taking version number into account.
As licenses may change over time, it may produce invalid results.
Client library for GitHub doesn't provide option to fetch License at given version/commit.
Log is not defined in imports in api/repo.go
. This is causing builds to fail.
Originally posted by @kishaningithub in #15
Passing a non-existent directory to the -p
argument causes a panic.
> ls $GOPATH/src
github.com
> glice -p example.com/some/repo
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x13bdbfd]
goroutine 1 [running]:
main.getFolders.func1(0xc0000e40c0, 0x2e, 0x0, 0x0, 0x1559cc0, 0xc00015a000, 0x2, 0x2)
/Users/dhouston/go/pkg/mod/github.com/ribice/[email protected]/main.go:115 +0x5d
path/filepath.Walk(0xc0000e40c0, 0x2e, 0xc0000c6900, 0x14c6aad, 0x1)
/usr/local/Cellar/go/1.12.5/libexec/src/path/filepath/path.go:402 +0x6a
main.getFolders(0xc0000e4090, 0x2d, 0x0, 0x0, 0x0, 0x1, 0xc0000ca660)
/Users/dhouston/go/pkg/mod/github.com/ribice/[email protected]/main.go:113 +0x175
main.main()
/Users/dhouston/go/pkg/mod/github.com/ribice/[email protected]/main.go:81 +0x50b
By adding a check on line 114 of main.go
for err != nil, I now get the following output
checkErr(filepath.Walk(fullPath+".", func(path string, info os.FileInfo, err error) error {
if err != nil {
return err
}
...
> glice -p example.com/some/repo
2019/07/18 11:46:25 lstat /Users/dhouston/go/src/example.com/some/repo/.: no such file or directory
Small change to make things a little more user friendly. Happy to submit a merge request
have run these command go get github.com/ribice/glice; go install github.com/ribice/glice, but in $GOPATH folder to run glice command , the error is Command 'glice' not found.
It would be really useful if you could tag and release v1.0.0
Given it is integrated with go releaser we should be able to download the binary instead of downloading source using go get and do compilation
When the dependency isn't on a well know repo (like github) there is an option to dynamically fetch the import path over https/http and discover where the code resides from a tag in the HTML
This is described here:
https://golang.org/cmd/go/#hdr-Remote_import_paths
For example, if you have a dependency on go.uber.org/zap, you can run:
curl go.uber.org/zap
And see that the repo is actually on github:
<!DOCTYPE html>
<html>
<head>
<meta name="go-import" content="go.uber.org/zap git https://github.com/uber-go/zap">
<meta name="go-source" content="go.uber.org/zap https://github.com/uber-go/zap https://github.com/uber-go/zap/tree/master{/dir} https://github.com/uber-go/zap/tree/master{/dir}/{file}#L{line}">
<meta http-equiv="refresh" content="0; url=https://godoc.org/go.uber.org/zap">
</head>
<body>
Nothing to see here. Please <a href="https://godoc.org/go.uber.org/zap">move along</a>.
</body>
</html>
I would really like the dependency, repourl and licence columns exported as a markdown table (can be just output, exporting on command line is easy enough through pipes) as this is great info to show for a repo in an md file when browsing on github
hello, we have a task for checking if the project's dependencies are EPL 2.0 compatible eclipse-che/che#16321
glice looked like a proper tool for that, but for some reason no detections happens:
[ibuziuk@fedora kubernetes-image-puller]$ glice
+--------------------------------------+---------+---------+
| DEPENDENCY | REPOURL | LICENSE |
+--------------------------------------+---------+---------+
| k8s.io/client-go/kubernetes | | |
| k8s.io/client-go/rest | | |
| k8s.io/client-go/tools/clientcmd | | |
| k8s.io/api/apps/v1 | | |
| k8s.io/api/core/v1 | | |
| k8s.io/apimachinery/pkg/api/errors | | |
| k8s.io/apimachinery/pkg/api/resource | | |
| k8s.io/apimachinery/pkg/apis/meta/v1 | | |
| k8s.io/apimachinery/pkg/watch | | |
+--------------------------------------+---------+---------+
[ibuziuk@fedora kubernetes-image-puller]$ glice -c
+--------------------------------------+---------+---------+-------+
| DEPENDENCY | REPOURL | LICENSE | COUNT |
+--------------------------------------+---------+---------+-------+
| k8s.io/client-go/kubernetes | | | 2 |
| k8s.io/client-go/rest | | | 1 |
| k8s.io/client-go/tools/clientcmd | | | 1 |
| k8s.io/api/apps/v1 | | | 1 |
| k8s.io/api/core/v1 | | | 1 |
| k8s.io/apimachinery/pkg/api/errors | | | 1 |
| k8s.io/apimachinery/pkg/api/resource | | | 1 |
| k8s.io/apimachinery/pkg/apis/meta/v1 | | | 1 |
| k8s.io/apimachinery/pkg/watch | | | 1 |
+--------------------------------------+---------+---------+-------+
is this expected or there is some known issue? Currently we have to check licenses manually e.g.
k8s.io/client-go/kubernetes -> https://github.com/kubernetes/client-go/blob/master/LICENSE -> Apache 2.0
$ glice
panic: runtime error: index out of range
goroutine 1 [running]:
main.main()
$GOPATH/pkg/mod/github.com/ribice/[email protected]/main.go:58 +0x5cd
I have a project which imports go.uber.org/atomic
(points to https://github.com/uber-go/atomic).
glice
does not pick up a License for this project even though it has an MIT license in the repo.
I suspect this is because it isn't following the vanity URL metadata redirect.
$ curl -v https://go.uber.org/atomic
<!DOCTYPE html>
<html>
<head>
<meta name="go-import" content="go.uber.org/atomic git https://github.com/uber-go/atomic">
<meta name="go-source" content="go.uber.org/atomic https://github.com/uber-go/atomic https://github.com/uber-go/atomic/tree/master{/dir} https://github.com/uber-go/atomic/tree/master{/dir}/{file}#L{line}">
<meta http-equiv="refresh" content="0; url=https://godoc.org/go.uber.org/atomic">
</head>
<body>
Nothing to see here. Please <a href="https://godoc.org/go.uber.org/atomic">move along</a>.
</body>
</html>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.