-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
replaces obsolete golint with staticcheck
Signed-off-by: Springcomp <[email protected]>
- Loading branch information
1 parent
6eb5a34
commit 950377b
Showing
7 changed files
with
65 additions
and
19 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,18 +32,31 @@ jobs: | |
run: go mod download | ||
- name: Tests | ||
run: make test | ||
- name: Install golint | ||
if: ${{ matrix.go-version == '1.17' }} | ||
run: | | ||
make install-dev-cmds | ||
make check | ||
|
||
static-check: | ||
name: Run Static Checks | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: '1.18' | ||
- name: Install deps | ||
run: go mod download | ||
- name: go vet ./... | ||
run: go vet ./... | ||
# TODO: improve with caching | ||
- uses: dominikh/[email protected] | ||
with: | ||
version: "2022.1.1" | ||
install-go: false | ||
min-go-version: "1.18" | ||
|
||
golangci-lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@aaa42aa0628b4ae2578232a66b541047968fac86 # v6.1.0 |
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
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
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
checks = [ | ||
"all", | ||
"-SA9003", | ||
"-ST1000", | ||
"-ST1003", | ||
"-ST1016", | ||
"-ST1020", | ||
"-ST1021", | ||
"-ST1022", | ||
"-ST1023", | ||
] | ||
initialisms = [ | ||
"ACL", "AMQP", "API", "ASCII", | ||
"CPU", "CSS", | ||
"DB", "DNS", | ||
"EOF", | ||
"GID", "GUID", | ||
"HTML", "HTTP", "HTTPS", | ||
"ID", "IP", | ||
"JSON", | ||
"QPS", | ||
"RAM", "RPC", "RTP", | ||
"SIP", "SLA", "SMTP", "SQL", "SSH", | ||
"TCP", "TLS", "TS", "TTL", | ||
"UDP", "UI", "UID", "UUID", "URI", "URL", "UTF8", | ||
"VM", | ||
"XML", "XMPP", "XSRF", "XSS", | ||
] | ||
dot_import_whitelist = [ | ||
"github.com/mmcloughlin/avo/build", | ||
"github.com/mmcloughlin/avo/operand", | ||
"github.com/mmcloughlin/avo/reg" | ||
] | ||
http_status_code_whitelist = ["200", "400", "404", "500"] |