From 4f630c02e621aafe798a466fed90565f7fe8a4cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Catt=C4=AB=20Cr=C5=ABd=C4=93l=C4=93s?= <17695588+wzy9607@users.noreply.github.com> Date: Fri, 9 Feb 2024 15:17:19 +0800 Subject: [PATCH] feat(ci): golangci-lint config --- .github/workflows/pull-request.yml | 23 +++++++++++++++++++++++ .golangci.yml | 17 +++++++++++++++++ README.md | 1 - 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/pull-request.yml create mode 100644 .golangci.yml diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml new file mode 100644 index 0000000..f5b1a21 --- /dev/null +++ b/.github/workflows/pull-request.yml @@ -0,0 +1,23 @@ +name: CI +on: + push: + branches: + - main + pull_request: + +permissions: + contents: read +jobs: + golangci-lint: + name: golangci-lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: 'stable' + - name: Run golangci-lint + uses: golangci/golangci-lint-action@v3.7.0 + with: + version: latest diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 0000000..60a5e08 --- /dev/null +++ b/.golangci.yml @@ -0,0 +1,17 @@ +run: + timeout: 10m + show-stats: true + +output: + sort-results: true + +#linters: + +issues: + include: + - EXC0003 + - EXC0004 + - EXC0005 + - EXC0006 + max-issues-per-linter: 0 + max-same-issues: 0 diff --git a/README.md b/README.md index b4284d6..11ded84 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,2 @@ # amqp091otel - OpenTelemetry instrumentation for github.com/rabbitmq/amqp091-go