diff --git a/.gitea/workflows/golangci-lint.yml b/.gitea/workflows/golangci-lint.yml new file mode 100644 index 0000000..f55d28f --- /dev/null +++ b/.gitea/workflows/golangci-lint.yml @@ -0,0 +1,19 @@ +name: golangci-lint + +on: + push: + +jobs: + golangci: + name: lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v4 + with: + go-version: "1.25" + - name: golangci-lint + uses: golangci/golangci-lint-action@v3 + with: + version: latest + args: --timeout=5m diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 0000000..9165981 --- /dev/null +++ b/.golangci.yml @@ -0,0 +1,63 @@ +run: + timeout: 5m + go: "1.25" + +linters-settings: + gci: + sections: + - standard + - default + - prefix(hypercode.run/alex/ask) + goimports: + local-prefixes: hypercode.run/alex/ask + gomodguard: + allowed: + modules: [] + domains: [] + blocked: + modules: [] + versions: [] + +linters: + enable: + - bodyclose + - copyloopvar + - dogsled + - dupl + - errcheck + - funlen + - gci + - gochecknoinits + - goconst + - gocritic + - gocyclo + - gofmt + - goimports + - goprintffuncname + - gosec + - gosimple + - govet + - ineffassign + - lll + - mnd + - misspell + - nakedret + - noctx + - nolintlint + - revive + - rowserrcheck + - staticcheck + - stylecheck + - typecheck + - unconvert + - unparam + - unused + - whitespace + +issues: + exclude-rules: + - path: _test\.go + linters: + - mnd + - funlen + - gocyclo diff --git a/README.md b/README.md index ec0bad5..8c623b0 100644 --- a/README.md +++ b/README.md @@ -1,2 +1 @@ # ask -