Skip to content
Closed
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
40 changes: 12 additions & 28 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,45 +2,29 @@ name: Lint

on:
pull_request:
branches:
- develop
merge_group:

permissions:
contents: read
pull-requests: read

jobs:
golangci-lint:
name: Lint Go files
runs-on: ubuntu-latest

env:
REPORT_PATH: ${{ github.workspace }}/golangci-lint-report.xml

permissions:
id-token: write
contents: read
actions: read
steps:
- name: Check out code
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
with:
persist-credentials: false
fetch-depth: 0

- name: Golangci-lint
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
# golangci-lint runs with absolute path mode: --path-mode=abs
with:
version: v2.1.6
only-new-issues: true
args: --output.checkstyle.path=${{ env.REPORT_PATH }}
working-directory: ${{ github.workspace }}

- name: Print lint report on failure
if: failure()
run: cat "${{ env.REPORT_PATH }}"

- name: Upload lint report
if: always()
uses: actions/upload-artifact@v4
- name: Linting Go
uses: smartcontractkit/.github/actions/ci-lint-go@5ef875a78da521085ad768ecf2ed5e25009496f7 # ci-lint-go@2.0.0
with:
name: golangci-lint-report
path: ${{ env.REPORT_PATH }}
golangci-lint-version: v2.1.6
use-go-cache: true
only-new-issues: false

ci-lint-misc:
name: Lint GH Actions and scripts
Expand Down
2 changes: 2 additions & 0 deletions deployment/ops/ccip/op_deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ type DeployCCIPObjects struct {
SourceTransferCapObjectId string
// offramp_state_helper
DestTransferCapObjectId string

exampleLintIssueId string
}

type DeployCCIPInput struct {
Expand Down
4 changes: 2 additions & 2 deletions deployment/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type CCIPChainState struct {
OnRampStateObjectID string
OffRampAddress string
OffRampOwnerCapID string
OffRampStateObjectID string
OffRampStateObjectId string
LinkTokenAddress string
LinkTokenCoinMetadataID string
LinkTokenTreasuryCapID string
Expand Down Expand Up @@ -94,7 +94,7 @@ func loadsuiChainStateFromAddresses(addresses map[string]cldf.TypeAndVersion) (C
chainState.OffRampAddress = addr

case SuiOffRampStateObjectIDType:
chainState.OffRampStateObjectID = addr
chainState.OffRampStateObjectId = addr

case SuiOffRampOwnerCapObjectIDType:
chainState.OffRampOwnerCapID = addr
Expand Down
2 changes: 1 addition & 1 deletion taskfiles/lint/Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ tasks:
default:
desc: "Run Go lint checks"
cmds:
- golangci-lint run --new-from-rev=origin/develop --path-mode=abs
- golangci-lint run --new-from-rev=origin/develop

fix:
desc: "Fix Go lint issues"
Expand Down
Loading