Skip to content

Commit df37232

Browse files
Support go lint
1 parent 58a1f5a commit df37232

97 files changed

Lines changed: 178 additions & 179 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/backport.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,3 @@ jobs:
1414
uses: tibdex/backport@v1
1515
with:
1616
github_token: ${{ secrets.GITHUB_TOKEN }}
17-

.github/workflows/ci.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
on: [push, pull_request]
1+
on: [ push, pull_request ]
22
name: CI
33
jobs:
44
test:
55
strategy:
66
matrix:
7-
go-version: [1.13.x]
8-
platform: [ubuntu-latest, macos-latest]
7+
go-version: [ 1.13.x ]
8+
platform: [ ubuntu-latest, macos-latest ]
99
runs-on: ${{ matrix.platform }}
1010
steps:
11-
- name: Install Go
12-
uses: actions/setup-go@v1
13-
with:
14-
go-version: ${{ matrix.go-version }}
11+
- name: Install Go
12+
uses: actions/setup-go@v1
13+
with:
14+
go-version: ${{ matrix.go-version }}
1515

16-
- name: Checkout code
17-
uses: actions/checkout@v2
18-
- name: Test
19-
run: |
20-
diff -u <(echo -n) <(gofmt -d $(find . -type f -name '*.go'))
21-
make && make test
16+
- name: Checkout code
17+
uses: actions/checkout@v2
18+
- name: Test
19+
run: |
20+
diff -u <(echo -n) <(gofmt -d $(find . -type f -name '*.go'))
21+
make && make test
2222
23-
- name: Upload coverage to Codecov
24-
uses: codecov/codecov-action@v1
25-
with:
26-
file: ./coverage.txt
23+
- name: Upload coverage to Codecov
24+
uses: codecov/codecov-action@v1
25+
with:
26+
file: ./coverage.txt

.github/workflows/pre-commit.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: pre-commit
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [master]
7+
8+
jobs:
9+
pre-commit:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
- uses: actions/setup-python@v3
14+
- uses: pre-commit/action@v3.0.0

.pre-commit-config.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v2.3.0
4+
hooks:
5+
- id: check-yaml
6+
- id: end-of-file-fixer
7+
- id: trailing-whitespace
8+
9+
- repo: https://github.com/golangci/golangci-lint
10+
rev: v1.16.0
11+
hooks:
12+
- id: golangci-lint

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
## 特点
66

77
#### 1. 广域适用
8-
8+
99
XuperCore通过极致的可扩展性,做到“广域场景适用”的区块链技术。基于XuperCore可以多纬度的自由扩展订制,非常便捷、快速的构建起适用于各类场景的区块链。开发者可以根据自己实际场景的需要,非常自由、多纬度的扩展。可选择对部分内核组件做订制;也可以基于标准组件订制自己的区块链引擎;也可以基于标准引擎,轻量级的订制自己的区块链实现。从而满足开发者的各纬度的需要,做到广域场景适用。
10-
10+
1111
#### 2. 高可扩展
1212

1313
XuperCore通过“动态内核技术”,做到了区块链内核核心流程和核心组件,都可以没有内核框架代码侵入的自由扩展替换,支持多纬度的自由扩展,让整个内核具备极好的可扩展性。通过对共识、账本、合约等这些内核组件做抽象,制定了区块链内核组件编程规范,这些规范就像主板上的插槽,起到承上启下的作用,让内核各核心组件可以自由的扩展替换,同时让引擎订制变得非常的轻量级。再在内核核心组件编程规范的基础上,设计了多引擎架构,让内核核心处理流程和技术选型也可以无内核代码侵入的自由扩展替换。

bcs/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,3 @@
22

33
负责区块链核心组件具体实现,支持无内核代码侵入插拔,可自由扩展替换。
44
新组件开发只需要满该子领域足内核定义的组件编程规范即可。
5-
6-

bcs/contract/evm/abi/abi_test.bin

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

bcs/ledger/xledger/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,3 @@
3939
5. 区块链元信息表。
4040

4141
6. 临时区块表(可以下线了)。
42-
43-

bcs/ledger/xledger/state/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,3 @@ NewState()
99

1010
RegisterAclMG(t.ctx.Acl)
1111
RegisterContractMG(t.ctx.Contract)
12-
13-

bcs/ledger/xledger/state/meta/meta_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ func TestMetaGetFunc(t *testing.T) {
102102
, "maxblocksize" : "128"
103103
, "period" : "5000"
104104
, "award" : "1000"
105-
}
105+
}
106106
`))
107107
if err != nil {
108108
t.Fatal(err)

0 commit comments

Comments
 (0)