Skip to content

Commit

Permalink
Merge 97d9226 into 75cd5b2
Browse files Browse the repository at this point in the history
  • Loading branch information
Denis Krivak committed Oct 12, 2019
2 parents 75cd5b2 + 97d9226 commit e17feaa
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 22 deletions.
17 changes: 10 additions & 7 deletions contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ By contributing to Talisman, you agree to abide by the [code of conduct](CODE_OF

## How to start contributing

If you are not sure how to begin contributing to Talisman, have a look at the issues tagged under [good first issue](https://github.com/thoughtworks/talisman/labels/good%20first%20issue).
If you are not sure how to begin contributing to Talisman, have a look at the issues tagged under [good first issue](https://github.com/thoughtworks/talisman/labels/good%20first%20issue).

## Developing locally

Expand All @@ -18,15 +18,19 @@ Once you have go 1.11 installed and setup, clone the talisman repository. In you
working copy, fetch the dependencies by having go mod fetch them for
you.

```` GO111MODULE=on go mod vendor ````
```
GO111MODULE=on go mod vendor
```

To run tests ```` GO111MODULE=on go test -mod=vendor ./... ````
To run tests `GO111MODULE=on go test -mod=vendor ./...`

To build Talisman, we can use [gox](https://github.com/mitchellh/gox):

```` gox -osarch="darwin/amd64 linux/386 linux/amd64" ````
```
gox -osarch="darwin/amd64 linux/386 linux/amd64"
```

Convenience scripts ```./build``` and ```./clean``` perform build and clean-up as mentioned above.
Convenience scripts `./build` and `./clean` perform build and clean-up as mentioned above.

## Submitting a Pull Request

Expand All @@ -36,7 +40,7 @@ To send in a pull request
2. Create a new feature branch based off the master branch.
3. Provide the commit message with the the issue number and a proper description.
4. Ensure that all the tests pass.
5. Submit the pull request.
5. Submit the pull request.

## Releasing

Expand All @@ -49,4 +53,3 @@ To send in a pull request
* Update the install script hosted on github pages: `git checkout gh-pages`, `git checkout master -- install.sh`, `git commit -m ...`

The latest version will now be accessible to anyone who builds their own binaries, downloads binaries directly from github releases, or uses the install script from the website.

23 changes: 8 additions & 15 deletions talisman.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,21 +49,14 @@ type options struct {

//Logger is the default log device, set to emit at the Error level by default
func main() {
flag.BoolVar(&fdebug, "d", false, "short form of debug")
flag.BoolVar(&fdebug, "debug", false, "enable debug mode (warning: very verbose)")
flag.BoolVar(&showVersion, "v", false, "short form of version")
flag.BoolVar(&showVersion, "version", false, "show current version of talisman")
flag.StringVar(&pattern, "p", "", "short form of pattern")
flag.StringVar(&pattern, "pattern", "", "pattern (glob-like) of files to scan (ignores githooks)")
flag.StringVar(&githook, "githook", PrePush, "either pre-push or pre-commit")
flag.BoolVar(&scan, "s", false, "short form of scanner")
flag.BoolVar(&scan, "scan", false, "scanner scans the git commit history for potential secrets")
flag.StringVar(&checksum, "c", "", "short form of checksum calculator")
flag.StringVar(&checksum, "checksum", "", "checksum calculator calculates checksum and suggests .talsimarc format")
flag.StringVar(&reportdirectory, "reportdirectory", "", "directory where the scan reports will be stored")
flag.StringVar(&reportdirectory, "rd", "", "short form of report directory")
flag.BoolVar(&scanWithHtml, "scanWithHtml", false, "Generate html report. (**Make sure you have installed talisman_html_report to use this, as mentioned in Readme)**")
flag.BoolVar(&scanWithHtml, "swh", false, "short form of html report scanner")
flag.BoolVarP(&fdebug, "debug", "d", false, "enable debug mode (warning: very verbose)")
flag.BoolVarP(&showVersion, "version", "v", false, "show current version of talisman")
flag.StringVarP(&pattern, "pattern", "p", "", "pattern (glob-like) of files to scan (ignores githooks)")
flag.StringVarP(&githook, "githook", "g", PrePush, "either pre-push or pre-commit")
flag.BoolVarP(&scan, "scan", "s", false, "scanner scans the git commit history for potential secrets")
flag.StringVarP(&checksum, "checksum", "c", "", "checksum calculator calculates checksum and suggests .talsimarc format")
flag.StringVarP(&reportdirectory, "reportdirectory", "r", "", "directory where the scan reports will be stored")
flag.BoolVarP(&scanWithHtml, "scanWithHtml", "w", false, "generate html report (**Make sure you have installed talisman_html_report to use this, as mentioned in Readme**)")

flag.Parse()

Expand Down

0 comments on commit e17feaa

Please sign in to comment.