Skip to content

Commit

Permalink
Merge pull request #507 from OdyseeTeam/fix-cleanup
Browse files Browse the repository at this point in the history
Code cleanup and fixes
  • Loading branch information
anbsky committed Jan 30, 2024
2 parents 4c615a9 + b17cf55 commit 3abeb34
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 4 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/golangci-lint.yml
@@ -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
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
@@ -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

0 comments on commit 3abeb34

Please sign in to comment.