Skip to content

Commit 9b6b33a

Browse files
committed
open sourcing preflight
0 parents  commit 9b6b33a

File tree

424 files changed

+180199
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

424 files changed

+180199
-0
lines changed

.github/workflows/ci.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
9+
jobs:
10+
build:
11+
name: Build
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
matrix:
15+
os: [ubuntu-latest, macos-latest]
16+
go: ['1.14', '1.15']
17+
env:
18+
VERBOSE: 1
19+
GOFLAGS: -mod=readonly
20+
GOPROXY: https://proxy.golang.org
21+
22+
steps:
23+
- name: Set up Go
24+
uses: actions/setup-go@v2
25+
with:
26+
go-version: ${{ matrix.go }}
27+
28+
- name: Checkout code
29+
uses: actions/checkout@v2
30+
31+
- name: golangci-lint
32+
uses: golangci/golangci-lint-action@v2
33+
with:
34+
args: --timeout 5m0s
35+
36+
- name: Test
37+
run: make test

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
autobrew
2+
dist/
3+
preflight
4+
.vscode/
5+
node_modules/
6+
coverage.out

.golangci.yml

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
linters-settings:
2+
dupl:
3+
threshold: 100
4+
funlen:
5+
lines: 100
6+
statements: 50
7+
goconst:
8+
min-len: 2
9+
min-occurrences: 2
10+
gocritic:
11+
enabled-tags:
12+
- diagnostic
13+
- experimental
14+
- opinionated
15+
- performance
16+
- style
17+
disabled-checks:
18+
- dupImport # https://github.com/go-critic/go-critic/issues/845
19+
- ifElseChain
20+
- octalLiteral
21+
- whyNoLint
22+
- wrapperFunc
23+
gocyclo:
24+
min-complexity: 20
25+
golint:
26+
min-confidence: 0
27+
gomnd:
28+
settings:
29+
mnd:
30+
# don't include the "operation" and "assign"
31+
checks: argument,case,condition,return
32+
govet:
33+
check-shadowing: true
34+
lll:
35+
line-length: 140
36+
maligned:
37+
suggest-new: true
38+
misspell:
39+
locale: US
40+
nolintlint:
41+
allow-leading-space: true # don't require machine-readable nolint directives (i.e. with no leading space)
42+
allow-unused: false # report any unused nolint directives
43+
require-explanation: false # don't require an explanation for nolint directives
44+
require-specific: false # don't require nolint directives to be specific about which linter is being skipped
45+
46+
linters:
47+
# please, do not use `enable-all`: it's deprecated and will be removed soon.
48+
# inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint
49+
disable-all: true
50+
enable:
51+
- bodyclose
52+
- deadcode
53+
- dogsled
54+
- dupl
55+
- errcheck
56+
- exportloopref
57+
- exhaustive
58+
- funlen
59+
- gochecknoinits
60+
- goconst
61+
- gocritic
62+
- gocyclo
63+
- gofmt
64+
- goimports
65+
- golint
66+
- gomnd
67+
- goprintffuncname
68+
- gosec
69+
- gosimple
70+
- govet
71+
- ineffassign
72+
- misspell
73+
- nakedret
74+
- noctx
75+
- nolintlint
76+
- rowserrcheck
77+
- staticcheck
78+
- structcheck
79+
- stylecheck
80+
- typecheck
81+
- unconvert
82+
- unparam
83+
- unused
84+
- varcheck
85+
86+
# don't enable:
87+
# - asciicheck
88+
# - scopelint
89+
# - gochecknoglobals
90+
# - gocognit
91+
# - godot
92+
# - godox
93+
# - goerr113
94+
# - interfacer
95+
# - maligned
96+
# - nestif
97+
# - prealloc
98+
# - testpackage
99+
# - revive
100+
# - wsl
101+
102+
issues:
103+
# Excluding configuration per-path, per-linter, per-text and per-source
104+
exclude:
105+
- 'bad syntax for struct tag key'
106+
- 'bad syntax for struct tag pair'
107+
108+
exclude-rules:
109+
- path: _test\.go
110+
linters:
111+
- govet
112+
- gomnd
113+
- goconst
114+
- gocritic
115+
- errcheck
116+
117+
# https://github.com/go-critic/go-critic/issues/926
118+
- linters:
119+
- gocritic
120+
text: "unnecessaryDefer:"
121+

.goreleaser.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# This is an example .goreleaser.yml file with some sane defaults.
2+
# Make sure to check the documentation at http://goreleaser.com
3+
builds:
4+
- env:
5+
- CGO_ENABLED=0
6+
goos:
7+
- linux
8+
- windows
9+
- darwin
10+
11+
archives:
12+
- replacements:
13+
darwin: Darwin
14+
linux: Linux
15+
windows: Windows
16+
386: i386
17+
amd64: x86_64
18+
19+
brews:
20+
-
21+
name: preflight
22+
tap:
23+
owner: spectralops
24+
name: homebrew-tap
25+
# Optionally a token can be provided, if it differs from the token provided to GoReleaser
26+
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
27+
description: Verify your curl scripts and executables before running them
28+
homepage: https://github.com/spectralops/preflight
29+
license: "Apache 2.0"
30+
install: |
31+
bin.install "preflight"
32+
33+
checksum:
34+
name_template: 'checksums.txt'
35+
36+
snapshot:
37+
name_template: "{{ .Tag }}-next"
38+
39+
changelog:
40+
sort: asc
41+
filters:
42+
exclude:
43+
- '^docs:'
44+
- '^test:'

0 commit comments

Comments
 (0)