Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: make pkg structure work with GoReleaser
Signed-off-by: Joseph Kato <joseph@jdkato.io>
- Loading branch information
Showing
14 changed files
with
68 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package main | ||
package cli | ||
|
||
import ( | ||
"fmt" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package main | ||
package cli | ||
|
||
import ( | ||
"sort" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package main | ||
package cli | ||
|
||
import ( | ||
"io/ioutil" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package main | ||
package cli | ||
|
||
import ( | ||
"errors" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package cli | ||
|
||
import ( | ||
"flag" | ||
|
||
"github.com/errata-ai/vale/v2/internal/core" | ||
"github.com/mholt/archiver/v3" | ||
) | ||
|
||
// Flags are the user-defined CLI flags. | ||
var Flags core.CLIFlags | ||
|
||
var zip archiver.Unarchiver | ||
|
||
func init() { | ||
flag.StringVar(&Flags.Sources, "sources", "", "config files to load") | ||
flag.StringVar(&Flags.Glob, "glob", "*", | ||
`A glob pattern (e.g., --glob='*.{md,txt}).'`) | ||
flag.StringVar(&Flags.Path, "config", "", | ||
`A file path (e.g., --config='some/file/path/.vale.ini').`) | ||
flag.StringVar(&Flags.AlertLevel, "minAlertLevel", "", | ||
`Lowest alert level to display (e.g., --minAlertLevel=error).`) | ||
flag.StringVar(&Flags.Output, "output", "CLI", | ||
`Output style ("line", "JSON", or a template file).`) | ||
flag.StringVar(&Flags.InExt, "ext", ".txt", | ||
`Extension to associate with stdin (e.g., --ext=.md).`) | ||
|
||
flag.BoolVar(&Flags.Wrap, "no-wrap", false, "Don't wrap CLI output.") | ||
flag.BoolVar(&Flags.NoExit, "no-exit", false, | ||
"Don't return a nonzero exit code on errors.") | ||
flag.BoolVar(&Flags.Local, "mode-compat", false, | ||
"prioritize local Vale configurations") | ||
flag.BoolVar(&Flags.Sorted, "sort", false, | ||
"sort files by their name in output") | ||
flag.BoolVar(&Flags.Normalize, "normalize", false, | ||
"replace each path separator with a slash ('/')") | ||
flag.BoolVar(&Flags.Simple, "ignore-syntax", false, | ||
"Lint all files line-by-line.") | ||
flag.BoolVar(&Flags.Relative, "relative", false, "return relative paths") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package main | ||
package cli | ||
|
||
import ( | ||
"fmt" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package main | ||
package cli | ||
|
||
import ( | ||
"fmt" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package main | ||
package cli | ||
|
||
import ( | ||
"fmt" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package main | ||
package cli | ||
|
||
import ( | ||
"encoding/json" | ||
|