Skip to content

Commit

Permalink
chore: add workflow to use golangci as a linter
Browse files Browse the repository at this point in the history
  • Loading branch information
rayanebel committed Jan 7, 2025
1 parent 791d68a commit 53d6206
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/helm-lint.yaml → .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,22 @@ on:
branches:
- main

permissions:
contents: read

jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.22
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.60
helm-lint:
runs-on: ubuntu-latest
steps:
Expand Down
61 changes: 61 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
linters:
disable-all: true
enable:
- asasalint
- asciicheck
- bidichk
- bodyclose
- dogsled
- durationcheck
- dupword
- errcheck
- copyloopvar
- errchkjson
- goconst
- gofmt
- sloglint
- goheader
- goimports
- goprintffuncname
- gosec
- gosimple
- gocritic
- govet
- ginkgolinter
- importas
- ineffassign
- misspell
- nakedret
- nosprintfhostport
- nilerr
- noctx
- nolintlint
- revive
- staticcheck
- stylecheck
- testifylint
- tparallel
- thelper
- typecheck
- unconvert
- unparam
- unused
- usestdlibvars
- whitespace
- wrapcheck
- tagliatelle
- sqlclosecheck
- promlinter
- prealloc
- contextcheck

linters-settings:
gocritic:
disabled-checks: [captLocal]
revive:
rules:
- name: blank-imports
disabled: true
issues: {}
run:
timeout: 5m

0 comments on commit 53d6206

Please sign in to comment.