Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code cleanup and fixes #507

Merged
merged 1 commit into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: golangci-lint
on:
push:
branches:
- master
- dev
pull_request:

permissions:
contents: read
# Optional: allow read access to pull request. Use with `only-new-issues` option.
# pull-requests: read

jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-go@v4
with:
go-version: '1.20.x'
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
# only-new-issues: true
- id: govulncheck
uses: golang/govulncheck-action@v1
5 changes: 1 addition & 4 deletions .github/workflows/test-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
with:
fetch-depth: 0
- uses: FedericoCarboni/setup-ffmpeg@v2
- uses: actions/setup-go@v3
- uses: actions/setup-go@v4
with:
go-version: '1.20.x'
id: go
Expand All @@ -46,9 +46,6 @@ jobs:
- name: Check running containers
run: docker ps -a

- name: Run go vet
run: go vet ./...

- name: Prepare for tests
run: make prepare_test

Expand Down
31 changes: 31 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
linters-settings:
errcheck:
check-type-assertions: true
goconst:
min-len: 2
min-occurrences: 3

linters:
disable-all: true
enable:
- dupl
- gocritic
- goconst
- gocyclo
- gofmt
- goimports
- gosimple
- govet
- gosec
- ineffassign
- misspell
- staticcheck
- sqlclosecheck
- unused

run:
timeout: 10m

issues:
# Show only new issues created after git revision: 02270a6
new-from-rev: d108866
Loading