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

Document CLI option --ignore expected format #12

Closed
chrisinmtown opened this issue Feb 10, 2020 · 3 comments · Fixed by #13
Closed

Document CLI option --ignore expected format #12

chrisinmtown opened this issue Feb 10, 2020 · 3 comments · Fixed by #13

Comments

@chrisinmtown
Copy link

chrisinmtown commented Feb 10, 2020

Please explain the expected format for the --ignore flag arguments in the usage message. I'd like to give multiple package names, do I separate them with commas, pipes or? I tried to use the force and read the source but I'm not a go expert.

I see the following when I run go-acc with no arguments:

$ go-acc
Error: requires at least 1 arg(s), only received 0
Usage:
  go-acc <flags> <packages...> [flags]

Examples:
$ go-acc github.com/some/package
$ go-acc -o my-coverfile.txt github.com/some/package
$ go-acc ./...
$ go-acc $(glide novendor)

You can pass all flags defined by "go test" after "--":
$ go-acc . -- -short -v -failfast


Flags:
      --covermode string   Which code coverage mode to use (default "atomic")
  -h, --help               help for go-acc
      --ignore strings     Will ignore packages that contains any of these strings
  -o, --output string      Location for the output file (default "coverage.txt")
  -t, --toggle             Help message for toggle
  -v, --verbose            Does nothing, there for compatibility

requires at least 1 arg(s), only received 0

I'm using go 1.12.16 and I installed go-acc by doing go get -v github.com/ory/go-acc. I don't know how to report the version to you, you might consider adding a "--version" or similar flag so people like me can report more accurately! Thanks for listening.

@aeneasr
Copy link
Member

aeneasr commented Feb 10, 2020

You're probably using Go modules, which fetches the latest tag automatically (v0.1.0). The ignore flag was added afterwards: v0.1.0...master

You probably know that, but you can fetch the current master using:go get github.com/ory/go-acc@master.

Supplying a version when pulling from source is not possible as it needs to be built as a binary for that to work reliably.

I've created a new tag v0.2.0 so the go get command should work correctly with go modules now.

@chrisinmtown
Copy link
Author

Thanks @aeneasr for adding the tag and educating me about how to fetch master. I'll update my issue, all I need to know is the syntax for giving multiple ignore patterns at the CLI.

@chrisinmtown chrisinmtown changed the title Document CLI option --ignore and expected format Document CLI option --ignore expected format Feb 10, 2020
@aeneasr
Copy link
Member

aeneasr commented Feb 10, 2020

I believe it should be --ignore foo,bar,baz

aeneasr added a commit that referenced this issue Feb 16, 2020
aeneasr added a commit that referenced this issue Feb 16, 2020
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

Successfully merging a pull request may close this issue.

2 participants