Skip to content

Commit

Permalink
reenable partitiontest
Browse files Browse the repository at this point in the history
  • Loading branch information
cce committed Nov 19, 2024
1 parent 42b9539 commit 8648463
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 16 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/reviewdog.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
name: "ReviewDog workflow"
env:
GOLANGCI_LINT_VERSION: "v1.62.0"
on:
push:
branches:
Expand All @@ -20,7 +22,7 @@ jobs:
uses: reviewdog/[email protected]
with:
go_version_file: go.mod
golangci_lint_version: "v1.62.0"
golangci_lint_version: ${{ env.GOLANGCI_LINT_VERSION }}
golangci_lint_flags: "-c .golangci.yml --allow-parallel-runners"
reporter: "github-pr-check"
tool_name: "Lint Errors"
Expand Down Expand Up @@ -56,27 +58,27 @@ jobs:
uses: actions/[email protected]
with:
path: cicdtmp/golangci-lint/golangci-lint-cgo
key: cicd-golangci-lint-cgo-v0.0.2-${{ env.GO_VERSION }}
key: cicd-golangci-lint-cgo-v0.0.3-${{ env.GO_VERSION }}-${{ env.GOLANGCI_LINT_VERSION }}

- name: Build custom golangci-lint with CGO_ENABLED
if: steps.cache-golangci-lint.outputs.cache-hit != 'true'
run: |
cd cicdtmp/golangci-lint
git clone https://github.com/golangci/golangci-lint.git .
git checkout tags/v1.62.0
git checkout tags/${GOLANGCI_LINT_VERSION}
CGO_ENABLED=true go build -trimpath -o golangci-lint-cgo ./cmd/golangci-lint
./golangci-lint-cgo --version
cd ../../
- name: Install reviewdog
run: |
curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/v0.20.2/install.sh | sh -s -- v0.20.2
reviewdog --version
# - name: Build custom linters
# run: |
# cd cmd/partitiontest_linter/
# CGO_ENABLED=true go build -buildmode=plugin -trimpath plugin/plugin.go
# cd ../../
# ls -la cmd/partitiontest_linter/
- name: Build custom linters
run: |
cd cmd/partitiontest_linter/
CGO_ENABLED=true go build -buildmode=plugin -trimpath plugin/plugin.go
cd ../../
ls -la cmd/partitiontest_linter/
- name: Run golangci-lint with reviewdog
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
14 changes: 7 additions & 7 deletions .golangci-warnings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ linters:
disable-all: true
enable:
- gosec
# - partitiontest
- partitiontest

linters-settings:
gosec: # Go 1.22 makes G601 irrelevant
excludes: [G101, G103, G104, G107, G202, G301, G302, G303, G304, G306, G307, G404, G601]
# custom:
# partitiontest:
# path: cmd/partitiontest_linter/plugin.so
# description: This custom linter checks files that end in '_test.go', specifically functions that start with 'Test' and have testing argument, for a line 'partitiontest.ParitionTest(<testing arg>)'
# original-url: github.com/algorand/go-algorand/cmd/partitiontest_linter
excludes: [G101, G103, G104, G107, G115, G202, G301, G302, G303, G304, G306, G307, G404, G601]
custom:
partitiontest:
path: cmd/partitiontest_linter/plugin.so
description: This custom linter checks files that end in '_test.go', specifically functions that start with 'Test' and have testing argument, for a line 'partitiontest.ParitionTest(<testing arg>)'
original-url: github.com/algorand/go-algorand/cmd/partitiontest_linter

severity:
default-severity: warning
Expand Down

0 comments on commit 8648463

Please sign in to comment.