Skip to content

Commit f7a8fa2

Browse files
authored
ci: use golangci-lint run --fix (#1196)
* ci: use golangci-lint run --fix * add changelog
1 parent 5e6564a commit f7a8fa2

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

.github/workflows/lint.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,14 @@ jobs:
4242
4343
BUILD_TAGS=rocksdb,grocksdb_clean_link
4444
go build -tags $BUILD_TAGS ./cmd/chain-maind
45-
golangci-lint run --output.text.path stdout --path-prefix=./ --timeout 30m --build-tags $BUILD_TAGS
45+
golangci-lint run --fix --output.text.path stdout --path-prefix=./ --timeout 30m --build-tags $BUILD_TAGS
4646
# Check only if there are differences in the source code
4747
if: steps.changed-files.outputs.any_changed == 'true'
48+
- name: check working directory is clean
49+
id: changes
50+
run: |
51+
set +e
52+
(git diff --no-ext-diff --exit-code)
53+
echo "changed=$?" >> $GITHUB_OUTPUT
54+
- if: steps.changes.outputs.changed == 1
55+
run: echo "Working directory is dirty" && exit 1

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
- [#1182](https://github.com/crypto-org-chain/chain-main/pull/1182) Refactor script to run chain locally to use daemon in default go PATH
1212
- [#1185](https://github.com/crypto-org-chain/chain-main/pull/1185) Error deleting legacy versions bug.
1313
- [#1189](https://github.com/crypto-org-chain/chain-main/pull/1189) versiondb interface missmatch.
14+
- [#1196](https://github.com/crypto-org-chain/chain-main/pull/1196) ci: use golangci-lint run --fix.
1415

1516

1617
*July 9, 2025*

0 commit comments

Comments
 (0)