Skip to content

Commit fc16e67

Browse files
authored
chore: introduce hawkeye to unify license header; update copyright to the ChaosBlade Authors (#31)
Signed-off-by: spencercjh <spencercjh@gmail.com>
1 parent 6ee0319 commit fc16e67

38 files changed

+447
-17
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# Copyright 2025 The ChaosBlade Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
115
name: CI
216

317
on:
@@ -103,6 +117,9 @@ jobs:
103117
- name: Run code style and import order verification
104118
run: make verify
105119

120+
- name: Check License Header
121+
uses: korandoru/hawkeye@v6
122+
106123
- name: Run tests
107124
run: make test
108125
env:

.github/workflows/release.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# Copyright 2025 The ChaosBlade Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
115
name: Release
216

317
on:

Makefile

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# Copyright 2025 The ChaosBlade Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
115
.PHONY: build clean linux_amd64 linux_arm64 darwin_amd64 darwin_arm64 build_all help
216

317
GO_ENV=CGO_ENABLED=0
@@ -89,6 +103,7 @@ help:
89103
@echo " test - Run tests with race detection"
90104
@echo " format - Format Go code using goimports and gofumpt"
91105
@echo " verify - Verify Go code formatting and import order"
106+
@echo " license-check - Check license headers in source files"
92107
@echo " help - Show this help message"
93108
@echo ""
94109
@echo " Examples:"
@@ -164,7 +179,7 @@ clean:
164179
rm -rf $(BUILD_TARGET)
165180

166181
.PHONY: format
167-
format:
182+
format: license-format
168183
@echo "Running goimports and gofumpt to format Go code..."
169184
@./hack/update-imports.sh
170185
@./hack/update-gofmt.sh
@@ -173,4 +188,14 @@ format:
173188
verify:
174189
@echo "Verifying Go code formatting and import order..."
175190
@./hack/verify-gofmt.sh
176-
@./hack/verify-imports.sh
191+
@./hack/verify-imports.sh
192+
193+
.PHONY: license-check
194+
license-check:
195+
@echo "Checking license headers..."
196+
docker run -it --rm -v $(shell pwd):/github/workspace ghcr.io/korandoru/hawkeye check
197+
198+
.PHONY: license-format
199+
license-format:
200+
@echo "Formatting license headers..."
201+
docker run -it --rm -v $(shell pwd):/github/workspace ghcr.io/korandoru/hawkeye format

build/spec.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 1999-2019 Alibaba Group Holding Ltd.
2+
* Copyright 2025 The ChaosBlade Authors
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

exec/application.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 1999-2020 Alibaba Group Holding Ltd.
2+
* Copyright 2025 The ChaosBlade Authors
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

exec/category.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 1999-2019 Alibaba Group Holding Ltd.
2+
* Copyright 2025 The ChaosBlade Authors
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

exec/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 1999-2019 Alibaba Group Holding Ltd.
2+
* Copyright 2025 The ChaosBlade Authors
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

exec/container.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 1999-2019 Alibaba Group Holding Ltd.
2+
* Copyright 2025 The ChaosBlade Authors
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

exec/container/container.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 1999-2020 Alibaba Group Holding Ltd.
2+
* Copyright 2025 The ChaosBlade Authors
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -13,6 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
1617
package container
1718

1819
import (

exec/container/container_linux.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 1999-2020 Alibaba Group Holding Ltd.
2+
* Copyright 2025 The ChaosBlade Authors
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -13,6 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
1617
package container
1718

1819
import (

0 commit comments

Comments
 (0)