From 140e570b8593974c695246f952c5fffa4eed3329 Mon Sep 17 00:00:00 2001 From: Aykhan Shahsuvarov Date: Fri, 28 Feb 2025 03:15:33 +0400 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=91=B7=20Added=20golangci-lint?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/golangci-lint.yml | 25 +++++++++++++++++++++++++ .golangci.yml | 27 +++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 .github/workflows/golangci-lint.yml create mode 100644 .golangci.yml diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml new file mode 100644 index 0000000..f684a6a --- /dev/null +++ b/.github/workflows/golangci-lint.yml @@ -0,0 +1,25 @@ +name: golangci-lint + +on: + push: + branches: + - main + pull_request: + +permissions: + contents: read + +jobs: + golangci: + name: lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: stable + - name: golangci-lint + uses: golangci/golangci-lint-action@v6 + with: + version: v1.64 + args: --timeout=10m --config=/.golangci.yml \ No newline at end of file diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 0000000..a40ea69 --- /dev/null +++ b/.golangci.yml @@ -0,0 +1,27 @@ +run: + go: "1.23" + concurrency: 8 + timeout: 10m + +linters: + disable-all: true + enable: + - asasalint + - asciicheck + - gofmt + - goimports + - gomodguard + - goprintffuncname + - govet + - ineffassign + - misspell + - nakedret + - nolintlint + - prealloc + - prealloc + - reassign + - staticcheck + - typecheck + - unconvert + - unused + - whitespace \ No newline at end of file From 6314cf77240bb26889cbb3197a705b6bc3c4ee8d Mon Sep 17 00:00:00 2001 From: Aykhan Shahsuvarov Date: Fri, 28 Feb 2025 03:16:03 +0400 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=90=B3=20'.golangci.yml'=20added=20to?= =?UTF-8?q?=20.dockerignore?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .dockerignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.dockerignore b/.dockerignore index 6026c9c..4da4366 100644 --- a/.dockerignore +++ b/.dockerignore @@ -4,6 +4,7 @@ binaries dodo .git .gitignore +.golangci.yml README.md LICENSE config.json From f0adcaf328fa9619dbb3a955ca601a3d1c0403d3 Mon Sep 17 00:00:00 2001 From: Aykhan Shahsuvarov Date: Fri, 28 Feb 2025 03:18:50 +0400 Subject: [PATCH 3/3] =?UTF-8?q?=F0=9F=91=B7=20Update=20golangci-lint.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/golangci-lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index f684a6a..cbbb4cf 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -22,4 +22,4 @@ jobs: uses: golangci/golangci-lint-action@v6 with: version: v1.64 - args: --timeout=10m --config=/.golangci.yml \ No newline at end of file + args: --timeout=10m --config=.golangci.yml