Skip to content

Commit c1c9b18

Browse files
committed
docs: add borders (pipe) to start and end of all tables rows
1 parent 139ed57 commit c1c9b18

File tree

1 file changed

+83
-83
lines changed

1 file changed

+83
-83
lines changed

README.md

Lines changed: 83 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -423,12 +423,12 @@ This can be useful, for example, for hooks that display warnings, but don't gene
423423
### go-build
424424
Compiles packages, along with their dependencies, but does not install the results.
425425
426-
| Hook ID | Description
427-
|---------------------|------------
428-
| `go-build-mod` | Run `'cd $(mod_root $FILE); go build -o /dev/null [$ARGS] ./...'` for each staged .go file
429-
| `go-build-pkg` | Run `'go build -o /dev/null [$ARGS] ./$(dirname $FILE)'` for each staged .go file
430-
| `go-build-repo-mod` | Run `'cd $(mod_root); go build -o /dev/null [$ARGS] ./...'` for each module in the repo
431-
| `go-build-repo-pkg` | Run `'go build -o /dev/null [$ARGS] ./...'` in repo root folder
426+
| Hook ID | Description |
427+
|---------------------|--------------------------------------------------------------------------------------------|
428+
| `go-build-mod` | Run `'cd $(mod_root $FILE); go build -o /dev/null [$ARGS] ./...'` for each staged .go file |
429+
| `go-build-pkg` | Run `'go build -o /dev/null [$ARGS] ./$(dirname $FILE)'` for each staged .go file |
430+
| `go-build-repo-mod` | Run `'cd $(mod_root); go build -o /dev/null [$ARGS] ./...'` for each module in the repo |
431+
| `go-build-repo-pkg` | Run `'go build -o /dev/null [$ARGS] ./...'` in repo root folder |
432432
433433
##### Install
434434
Comes with Golang ( [golang.org](https://golang.org/) )
@@ -441,10 +441,10 @@ Comes with Golang ( [golang.org](https://golang.org/) )
441441
### go-mod-tidy
442442
Makes sure `go.mod` matches the source code in the module.
443443
444-
| Hook ID | Description
445-
|--------------------|------------
446-
| `go-mod-tidy` | Run `'cd $(mod_root $FILE); go mod tidy [$ARGS] ./...'` for each staged .go file
447-
| `go-mod-tidy-repo` | Run `'cd $(mod_root); go mod tidy [$ARGS] ./...'` for each module in the repo
444+
| Hook ID | Description |
445+
|--------------------|----------------------------------------------------------------------------------|
446+
| `go-mod-tidy` | Run `'cd $(mod_root $FILE); go mod tidy [$ARGS] ./...'` for each staged .go file |
447+
| `go-mod-tidy-repo` | Run `'cd $(mod_root); go mod tidy [$ARGS] ./...'` for each module in the repo |
448448
449449
##### Install
450450
Comes with Golang ( [golang.org](https://golang.org/) )
@@ -457,12 +457,12 @@ Comes with Golang ( [golang.org](https://golang.org/) )
457457
### go-test
458458
Automates testing, printing a summary of test results.
459459
460-
| Hook ID | Description
461-
|--------------------|------------
462-
| `go-test-mod` | Run `'cd $(mod_root $FILE); go test [$ARGS] ./...'` for each staged .go file
463-
| `go-test-pkg` | Run `'go test [$ARGS] ./$(dirname $FILE)'` for each staged .go file
464-
| `go-test-repo-mod` | Run `'cd $(mod_root); go test [$ARGS] ./...'` for each module in the repo
465-
| `go-test-repo-pkg` | Run `'go test [$ARGS] ./...'` in repo root folder
460+
| Hook ID | Description |
461+
|--------------------|------------------------------------------------------------------------------|
462+
| `go-test-mod` | Run `'cd $(mod_root $FILE); go test [$ARGS] ./...'` for each staged .go file |
463+
| `go-test-pkg` | Run `'go test [$ARGS] ./$(dirname $FILE)'` for each staged .go file |
464+
| `go-test-repo-mod` | Run `'cd $(mod_root); go test [$ARGS] ./...'` for each module in the repo |
465+
| `go-test-repo-pkg` | Run `'go test [$ARGS] ./...'` in repo root folder |
466466
467467
##### Install
468468
Comes with Golang ( [golang.org](https://golang.org/) )
@@ -475,12 +475,12 @@ Comes with Golang ( [golang.org](https://golang.org/) )
475475
### go-sec
476476
Inspects source code for security problems by scanning the Go AST.
477477
478-
| Hook ID | Description
479-
|-------------------|------------
480-
| `go-sec-mod` | Run `'cd $(mod_root $FILE); gosec [$ARGS] ./...'` for each staged .go file
481-
| `go-sec-pkg` | Run `'gosec [$ARGS] ./$(dirname $FILE)'` for each staged .go file
482-
| `go-sec-repo-mod` | Run `'cd $(mod_root); gosec [$ARGS] ./...'` for each module in the repo
483-
| `go-sec-repo-pkg` | Run `'gosec [$ARGS] ./...'` in repo root folder
478+
| Hook ID | Description |
479+
|-------------------|----------------------------------------------------------------------------|
480+
| `go-sec-mod` | Run `'cd $(mod_root $FILE); gosec [$ARGS] ./...'` for each staged .go file |
481+
| `go-sec-pkg` | Run `'gosec [$ARGS] ./$(dirname $FILE)'` for each staged .go file |
482+
| `go-sec-repo-mod` | Run `'cd $(mod_root); gosec [$ARGS] ./...'` for each module in the repo |
483+
| `go-sec-repo-pkg` | Run `'gosec [$ARGS] ./...'` in repo root folder |
484484
485485
##### Install (via [bingo](https://github.com/TekWizely/bingo))
486486
```
@@ -495,12 +495,12 @@ bingo install github.com/securego/gosec/v2/cmd/gosec
495495
### go-staticcheck
496496
A state of the art linter for the Go programming language. Using static analysis, it finds bugs and performance issues, offers simplifications, and enforces style rules.
497497
498-
| Hook ID | Description
499-
|---------------------------|------------
500-
| `go-staticcheck-mod` | Run `'cd $(mod_root $FILE); staticcheck [$ARGS] ./...'` for each staged .go file
501-
| `go-staticcheck-pkg` | Run `'staticcheck [$ARGS] ./$(dirname $FILE)'` for each staged .go file
502-
| `go-staticcheck-repo-mod` | Run `'cd $(mod_root); staticcheck [$ARGS] ./...'` for each module in the repo
503-
| `go-staticcheck-repo-pkg` | Run `'staticcheck [$ARGS] ./...'` in repo root folder
498+
| Hook ID | Description |
499+
|---------------------------|----------------------------------------------------------------------------------|
500+
| `go-staticcheck-mod` | Run `'cd $(mod_root $FILE); staticcheck [$ARGS] ./...'` for each staged .go file |
501+
| `go-staticcheck-pkg` | Run `'staticcheck [$ARGS] ./$(dirname $FILE)'` for each staged .go file |
502+
| `go-staticcheck-repo-mod` | Run `'cd $(mod_root); staticcheck [$ARGS] ./...'` for each module in the repo |
503+
| `go-staticcheck-repo-pkg` | Run `'staticcheck [$ARGS] ./...'` in repo root folder |
504504
505505
##### Install (via [bingo](https://github.com/TekWizely/bingo))
506506
```
@@ -517,12 +517,12 @@ Recommends struct field rearrangements to provide for maximum space/allocation e
517517
518518
- Can modify files (see `-apply`)
519519
520-
| Hook ID | Description
521-
|--------------------------|------------
522-
| `go-structslop-mod` | Run `'cd $(mod_root $FILE); structslop [$ARGS] ./...'` for each staged .go file
523-
| `go-structslop-pkg` | Run `'structslop [$ARGS] ./$(dirname $FILE)'` for each staged .go file
524-
| `go-structslop-repo-mod` | Run `'cd $(mod_root); structslop [$ARGS] ./...'` for each module in the repo
525-
| `go-structslop-repo-pkg` | Run `'structslop [$ARGS] ./...'` in repo root folder
520+
| Hook ID | Description |
521+
|--------------------------|---------------------------------------------------------------------------------|
522+
| `go-structslop-mod` | Run `'cd $(mod_root $FILE); structslop [$ARGS] ./...'` for each staged .go file |
523+
| `go-structslop-pkg` | Run `'structslop [$ARGS] ./$(dirname $FILE)'` for each staged .go file |
524+
| `go-structslop-repo-mod` | Run `'cd $(mod_root); structslop [$ARGS] ./...'` for each module in the repo |
525+
| `go-structslop-repo-pkg` | Run `'structslop [$ARGS] ./...'` in repo root folder |
526526
527527
##### Install (via [bingo](https://github.com/TekWizely/bingo))
528528
```
@@ -545,13 +545,13 @@ Printf calls whose arguments do not align with the format string. Vet uses
545545
heuristics that do not guarantee all reports are genuine problems, but it
546546
can find errors not caught by the compilers.
547547
548-
| Hook ID | Description
549-
|-------------------|------------
550-
| `go-vet` | Run `'go vet [$ARGS] $FILE'` for each staged .go file
551-
| `go-vet-mod` | Run `'cd $(mod_root $FILE); go vet [$ARGS] ./...'` for each staged .go file
552-
| `go-vet-pkg` | Run `'go vet [$ARGS] ./$(dirname $FILE)'` for each staged .go file
553-
| `go-vet-repo-mod` | Run `'cd $(mod_root); go vet [$ARGS] ./...'` for each module in the repo
554-
| `go-vet-repo-pkg` | Run `'go vet [$ARGS] ./...'` in repo root folder
548+
| Hook ID | Description |
549+
|-------------------|-----------------------------------------------------------------------------|
550+
| `go-vet` | Run `'go vet [$ARGS] $FILE'` for each staged .go file |
551+
| `go-vet-mod` | Run `'cd $(mod_root $FILE); go vet [$ARGS] ./...'` for each staged .go file |
552+
| `go-vet-pkg` | Run `'go vet [$ARGS] ./$(dirname $FILE)'` for each staged .go file |
553+
| `go-vet-repo-mod` | Run `'cd $(mod_root); go vet [$ARGS] ./...'` for each module in the repo |
554+
| `go-vet-repo-pkg` | Run `'go vet [$ARGS] ./...'` in repo root folder |
555555
556556
##### Install
557557
Comes with Golang ( [golang.org](https://golang.org/) )
@@ -566,10 +566,10 @@ Formats Go programs. It uses tabs for indentation and blanks for alignment. Alig
566566
567567
- Can modify files (see `-w`)
568568
569-
| Hook ID | Description
570-
|---------------|------------
571-
| `go-fmt` | Run `'gofmt -l -d [$ARGS] $FILE'` for each staged .go file
572-
| `go-fmt-repo` | Run `'gofmt -l -d [$ARGS] .'` in repo root folder
569+
| Hook ID | Description |
570+
|---------------|------------------------------------------------------------|
571+
| `go-fmt` | Run `'gofmt -l -d [$ARGS] $FILE'` for each staged .go file |
572+
| `go-fmt-repo` | Run `'gofmt -l -d [$ARGS] .'` in repo root folder |
573573
574574
##### Install
575575
Comes with Golang ( [golang.org](https://golang.org/) )
@@ -592,10 +592,10 @@ Enforce a stricter format than `gofmt`, while being backwards compatible.
592592
- Replaces `go-fmt`
593593
- Can modify files (see `-w`)
594594
595-
| Hook ID | Description
596-
|-----------------|------------
597-
| `go-fumpt` | Run `'gofumpt -l -d [$ARGS] $FILE'` for each staged .go file
598-
| `go-fumpt-repo` | Run `'gofumpt -l -d [$ARGS] .'` in repo root folder
595+
| Hook ID | Description |
596+
|-----------------|--------------------------------------------------------------|
597+
| `go-fumpt` | Run `'gofumpt -l -d [$ARGS] $FILE'` for each staged .go file |
598+
| `go-fumpt-repo` | Run `'gofumpt -l -d [$ARGS] .'` in repo root folder |
599599
600600
##### Install (via [bingo](https://github.com/TekWizely/bingo))
601601
```
@@ -621,10 +621,10 @@ Updates your Go import lines, adding missing ones and removing unreferenced ones
621621
- Replaces `go-fmt`
622622
- Can modify files (see `-w`)
623623
624-
| Hook ID | Description
625-
|-------------------|------------
626-
| `go-imports` | Run `'goimports -l -d [$ARGS] $FILE'` for each staged .go file
627-
| `go-imports-repo` | Run `'goimports -l -d [$ARGS] .'` in repo root folder
624+
| Hook ID | Description |
625+
|-------------------|----------------------------------------------------------------|
626+
| `go-imports` | Run `'goimports -l -d [$ARGS] $FILE'` for each staged .go file |
627+
| `go-imports-repo` | Run `'goimports -l -d [$ARGS] .'` in repo root folder |
628628
629629
##### Install (via [bingo](https://github.com/TekWizely/bingo))
630630
```
@@ -652,10 +652,10 @@ Implements a Go pretty-printer (like `go-fmt`) that also adds zero-value return
652652
- Replaces `go-fmt` and `go-imports`
653653
- Can modify files (see `-w`)
654654
655-
| Hook ID | Description
656-
|-------------------|------------
657-
| `go-returns` | Run `'goreturns -l -d [$ARGS] $FILE'` for each staged .go file
658-
| `go-returns-repo` | Run `'goreturns -l -d [$ARGS] .'` in repo root folder
655+
| Hook ID | Description |
656+
|-------------------|----------------------------------------------------------------|
657+
| `go-returns` | Run `'goreturns -l -d [$ARGS] $FILE'` for each staged .go file |
658+
| `go-returns-repo` | Run `'goreturns -l -d [$ARGS] .'` in repo root folder |
659659
660660
##### Install (via [bingo](https://github.com/TekWizely/bingo))
661661
```
@@ -682,9 +682,9 @@ bingo install github.com/sqs/goreturns
682682
### go-lint
683683
A linter for Go source code, meant to carry out the stylistic conventions put forth in [Effective Go](https://golang.org/doc/effective_go.html) and [CodeReviewComments](https://golang.org/wiki/CodeReviewComments).
684684
685-
| Hook ID | Description
686-
|-----------|------------
687-
| `go-lint` | Run `'golint -set_exit_status [$ARGS] $FILE'` for each staged .go file
685+
| Hook ID | Description |
686+
|-----------|------------------------------------------------------------------------|
687+
| `go-lint` | Run `'golint -set_exit_status [$ARGS] $FILE'` for each staged .go file |
688688
689689
##### Install (via [bingo](https://github.com/TekWizely/bingo))
690690
```
@@ -701,11 +701,11 @@ bingo install golang.org/x/lint/golint
701701
### go-revive
702702
\~6x faster, stricter, configurable, extensible, and beautiful drop-in replacement for golint.
703703
704-
| Hook ID | Description
705-
|-----------|------------
706-
| `go-revive` | Run `'revive [$ARGS] $FILE'` for each staged .go file
707-
| `go-revive-mod` | Run `'cd $(mod_root $FILE); revive [$ARGS] ./...'` for each staged .go file
708-
| `go-revive-repo-mod` | Run `'cd $(mod_root); revive [$ARGS] ./...'` for each module in the repo
704+
| Hook ID | Description |
705+
|----------------------|-----------------------------------------------------------------------------|
706+
| `go-revive` | Run `'revive [$ARGS] $FILE'` for each staged .go file |
707+
| `go-revive-mod` | Run `'cd $(mod_root $FILE); revive [$ARGS] ./...'` for each staged .go file |
708+
| `go-revive-repo-mod` | Run `'cd $(mod_root); revive [$ARGS] ./...'` for each module in the repo |
709709
710710
##### Support for Repository-Level Config
711711
As of time of writing, revive only auto-checks for configs in `${HOME}/revive.toml`, and doesn't check the local folder (ie. `${REPO_ROOT}/revive.toml`).
@@ -745,9 +745,9 @@ You can use the `"verbose: true"` hook configuration to always show hook output.
745745
### go-critic
746746
The most opinionated Go source code linter for code audit.
747747
748-
| Hook ID | Description
749-
|-------------|------------
750-
| `go-critic` | Run `'gocritic check [$ARGS] $FILE'` for each staged .go file
748+
| Hook ID | Description |
749+
|-------------|---------------------------------------------------------------|
750+
| `go-critic` | Run `'gocritic check [$ARGS] $FILE'` for each staged .go file |
751751
752752
##### Install
753753
https://github.com/go-critic/go-critic#installation
@@ -780,13 +780,13 @@ A FAST linter aggregator, with colored output, fewer false-positives, and suppor
780780
- Can report only new issues (see `--new`)
781781
- Can modify files (see `--fix`)
782782
783-
| Hook ID | Description
784-
|--------------------------|------------
785-
| `golangci-lint` | Run `'golangci-lint run [$ARGS] $FILE'` for each staged .go file
786-
| `golangci-lint-mod` | Run `'cd $(mod_root $FILE); golangci-lint run [$ARGS] ./...'` for each staged .go file
787-
| `golangci-lint-pkg` | Run `'golangci-lint run [$ARGS] ./$(dirname $FILE)'` for each staged .go file
788-
| `golangci-lint-repo-mod` | Run `'cd $(mod_root); golangci-lint run [$ARGS] ./...'` for each module in the repo
789-
| `golangci-lint-repo-pkg` | Run `'golangci-lint run [$ARGS] ./...'` in repo root folder
783+
| Hook ID | Description |
784+
|--------------------------|----------------------------------------------------------------------------------------|
785+
| `golangci-lint` | Run `'golangci-lint run [$ARGS] $FILE'` for each staged .go file |
786+
| `golangci-lint-mod` | Run `'cd $(mod_root $FILE); golangci-lint run [$ARGS] ./...'` for each staged .go file |
787+
| `golangci-lint-pkg` | Run `'golangci-lint run [$ARGS] ./$(dirname $FILE)'` for each staged .go file |
788+
| `golangci-lint-repo-mod` | Run `'cd $(mod_root); golangci-lint run [$ARGS] ./...'` for each module in the repo |
789+
| `golangci-lint-repo-pkg` | Run `'golangci-lint run [$ARGS] ./...'` in repo root folder |
790790
791791
##### Install (via [bingo](https://github.com/TekWizely/bingo))
792792
```
@@ -825,14 +825,14 @@ bingo install github.com/golangci/golangci-lint/cmd/golangci-lint
825825
826826
Using the `my-cmd-*` hooks, you can invoke custom go tools in various contexts.
827827
828-
| Hook ID | Description
829-
|-------------------|------------
830-
| `my-cmd` | Run `'$ARGS[0] [$ARGS[1:]] $FILE'` for each staged .go file
831-
| `my-cmd-mod` | Run `'cd $(mod_root $FILE); GO111MODULE=on $ARGS[0] [$ARGS[1:]]'` for each staged .go file
832-
| `my-cmd-pkg` | Run `'GO111MODULE=off $ARGS[0] [$ARGS[1:]] ./$(dirname $FILE)'` for each staged .go file
833-
| `my-cmd-repo` | Run `'$ARGS[0] [$ARGS[1:]]'` in the repo root folder
834-
| `my-cmd-repo-mod` | Run `'cd $(mod_root); GO111MODULE=on $ARGS[0] [$ARGS[1:]]'` for each module in the repo
835-
| `my-cmd-repo-pkg` | Run `'GO111MODULE=off $ARGS[0] [$ARGS[1:]]` in repo root folder
828+
| Hook ID | Description |
829+
|-------------------|--------------------------------------------------------------------------------------------|
830+
| `my-cmd` | Run `'$ARGS[0] [$ARGS[1:]] $FILE'` for each staged .go file |
831+
| `my-cmd-mod` | Run `'cd $(mod_root $FILE); GO111MODULE=on $ARGS[0] [$ARGS[1:]]'` for each staged .go file |
832+
| `my-cmd-pkg` | Run `'GO111MODULE=off $ARGS[0] [$ARGS[1:]] ./$(dirname $FILE)'` for each staged .go file |
833+
| `my-cmd-repo` | Run `'$ARGS[0] [$ARGS[1:]]'` in the repo root folder |
834+
| `my-cmd-repo-mod` | Run `'cd $(mod_root); GO111MODULE=on $ARGS[0] [$ARGS[1:]]'` for each module in the repo |
835+
| `my-cmd-repo-pkg` | Run `'GO111MODULE=off $ARGS[0] [$ARGS[1:]]` in repo root folder |
836836
837837
#### Configuring the hooks
838838

0 commit comments

Comments
 (0)