mirror of
https://github.com/FiloSottile/mkcert.git
synced 2025-10-14 00:41:40 +08:00
Add staticcheck to CI (#171)
This commit is contained in:
@@ -1,10 +1,11 @@
|
|||||||
language: go
|
language: go
|
||||||
sudo: false
|
sudo: false
|
||||||
go: stable
|
go: stable
|
||||||
install: "# skip"
|
install: (cd && go get honnef.co/go/tools/cmd/staticcheck)
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- go vet
|
- go vet
|
||||||
|
- staticcheck ./...
|
||||||
- CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o "mkcert-$(git describe --tags)-linux-amd64"
|
- CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o "mkcert-$(git describe --tags)-linux-amd64"
|
||||||
- CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=6 go build -o "mkcert-$(git describe --tags)-linux-arm"
|
- CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=6 go build -o "mkcert-$(git describe --tags)-linux-arm"
|
||||||
- CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -o "mkcert-$(git describe --tags)-darwin-amd64"
|
- CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -o "mkcert-$(git describe --tags)-darwin-amd64"
|
||||||
|
6
main.go
6
main.go
@@ -92,13 +92,13 @@ func main() {
|
|||||||
p12FileFlag = flag.String("p12-file", "", "")
|
p12FileFlag = flag.String("p12-file", "", "")
|
||||||
)
|
)
|
||||||
flag.Usage = func() {
|
flag.Usage = func() {
|
||||||
fmt.Fprintf(flag.CommandLine.Output(), shortUsage)
|
fmt.Fprint(flag.CommandLine.Output(), shortUsage)
|
||||||
fmt.Fprintln(flag.CommandLine.Output(), `For more options, run "mkcert -help".`)
|
fmt.Fprintln(flag.CommandLine.Output(), `For more options, run "mkcert -help".`)
|
||||||
}
|
}
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
if *helpFlag {
|
if *helpFlag {
|
||||||
fmt.Fprintf(flag.CommandLine.Output(), shortUsage)
|
fmt.Fprint(flag.CommandLine.Output(), shortUsage)
|
||||||
fmt.Fprintf(flag.CommandLine.Output(), advancedUsage)
|
fmt.Fprint(flag.CommandLine.Output(), advancedUsage)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if *carootFlag {
|
if *carootFlag {
|
||||||
|
Reference in New Issue
Block a user