Skip to content

chore(lint): use new-from-rev field #115

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # required for new-from-rev option to work
- uses: actions/setup-go@v5
with:
go-version: stable
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/rename-module.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,29 @@ jobs:
commit_message: "[AUTO] rename Go module + update internal import paths\n\nWorkflow: ${{ steps.vars.outputs.WORKFLOW_HASH }} on branch ${{ github.ref_name }}"
repo: ${{ github.repository }}
branch: ${{ steps.vars.outputs.DEST_BRANCH }}

update-golangci:
runs-on: ubuntu-latest
needs: rename-module
steps:
- uses: actions/checkout@v4
with:
ref: ${{ needs.rename-module.outputs.vars.DEST_BRANCH }}
depth: 1

- name: Update .golangci.yml new-from-rev
uses: fjogeleit/yaml-update-action@main
with:
valueFile: ".golangci.yml"
propertyPath: "issues.new-from-rev"
value: $(git rev-parse HEAD)
commitChange: false

- name: Signed commit to branch
uses: planetscale/ghcommit-action@d4176bfacef926cc2db351eab20398dfc2f593b5 # v0.2.0
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
with:
commit_message: "[AUTO] update .golangci.yml new-from-rev"
repo: ${{ github.repository }}
branch: ${{ needs.rename-module.outputs.vars.DEST_BRANCH }}
32 changes: 1 addition & 31 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,38 +78,8 @@ linters-settings:
disabled: true

issues:
new-from-rev: 0b56af5a01b8a0c6fc9d60247bb79ffd03d1bcfd
exclude-dirs-use-default: false
exclude-rules:
- path-except: libevm
linters:
# If any issue is flagged in a non-libevm file, add the linter here
# because the problem isn't under our control.
- containedctx
- forcetypeassert
- errcheck
- gci
- gofmt
- goheader
- goimports
- gosec
- gosimple
- govet
- nakedret
- nestif
- nilerr
- nolintlint
- revive
- staticcheck
- tagliatelle
- testableexamples
- testifylint
- thelper
- tparallel
- typecheck
- usestdlibvars
- varnamelen
- wastedassign
- whitespace
include:
# Many of the default exclusions are because, verbatim "Annoying issue",
# which defeats the point of a linter.
Expand Down