Skip to content

Commit b1e54ae

Browse files
authored
Improve docs (#21)
1 parent 98509d0 commit b1e54ae

4 files changed

Lines changed: 28 additions & 8 deletions

File tree

README.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,35 @@
11
[![Go](https://github.com/fmenezes/codeowners/workflows/Go/badge.svg)](https://github.com/fmenezes/codeowners/actions?query=branch%3Amaster)
22
[![Go Report Card](https://goreportcard.com/badge/github.com/fmenezes/codeowners)](https://goreportcard.com/report/github.com/fmenezes/codeowners)
33
[![Coverage](https://coveralls.io/repos/github/fmenezes/codeowners/badge.svg?branch=master)](https://coveralls.io/github/fmenezes/codeowners?branch=master)
4+
[![Godoc](https://godoc.org/github.com/fmenezes/codeowners?status.svg)](https://godoc.org/github.com/fmenezes/codeowners)
45

56
# CODEOWNERS
67

7-
CodeOwners coder provides funcionality to evaluate CODEOWNERS file in Go. Also provices linter CLI.
8+
CodeOwners coder provides funcionality to evaluate CODEOWNERS file in Go. Also provides linter CLI.
89

910
## Documentation
1011

12+
### Package
13+
1114
To find package documentation follow https://godoc.org/github.com/fmenezes/codeowners
1215

16+
### CLI
17+
18+
#### Installation
19+
20+
Simply run `go get -u github.com/fmenezes/codeowners/cmd/codeowners`
21+
22+
#### Usage
23+
24+
Simply calling `codeowners` will quick off the cli on the current directory.
25+
26+
##### Options
27+
28+
| Option | Default Value | Description |
29+
| ------------- | ------------- | ------------------------------------------------------------------------------ |
30+
| d | . | Directory: specifies the directory you want to use to lint the CODEOWNERS file |
31+
| f | | Format: specifies the format you want to return lint results |
32+
1333
## Compatibility
1434

1535
:warning: This module is on a v0 mode and it is not ready to be used, once it reaches the v1 we will lock the API.
File renamed without changes.
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func testRun(opt options) (string, error) {
1616

1717
func TestPass(t *testing.T) {
1818
opt := options{
19-
directory: "../test/data/pass",
19+
directory: "../../test/data/pass",
2020
format: "",
2121
}
2222

@@ -34,7 +34,7 @@ func TestPass(t *testing.T) {
3434

3535
func TestNoOwners(t *testing.T) {
3636
opt := options{
37-
directory: "../test/data/no_owners",
37+
directory: "../../test/data/no_owners",
3838
format: "",
3939
}
4040

@@ -52,7 +52,7 @@ func TestNoOwners(t *testing.T) {
5252

5353
func TestCustomFormat(t *testing.T) {
5454
opt := options{
55-
directory: "../test/data/noowners",
55+
directory: "../../test/data/noowners",
5656
format: "test",
5757
}
5858

@@ -69,7 +69,7 @@ func TestCustomFormat(t *testing.T) {
6969

7070
func TestInvalidFormat(t *testing.T) {
7171
opt := options{
72-
directory: "../test/data/noowners",
72+
directory: "../../test/data/noowners",
7373
format: " {{template \"one\"}} ",
7474
}
7575

@@ -79,7 +79,7 @@ func TestInvalidFormat(t *testing.T) {
7979
}
8080

8181
opt = options{
82-
directory: "../test/data/noowners",
82+
directory: "../../test/data/noowners",
8383
format: " {{ . ",
8484
}
8585

cmd/main.go renamed to cmd/codeowners/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import (
99
)
1010

1111
func main() {
12-
dir := flag.String("d", ".", "Specifies the directory you want to use to lint the CODEOWNERS file")
13-
format := flag.String("f", "", "Specifies the format you want to return lint results")
12+
dir := flag.String("d", ".", "Directory: specifies the directory you want to use to lint the CODEOWNERS file")
13+
format := flag.String("f", "", "Format: specifies the format you want to return lint results")
1414
flag.Parse()
1515

1616
opt := options{

0 commit comments

Comments
 (0)