kmesh icon indicating copy to clipboard operation
kmesh copied to clipboard

Improve copyright checker

Open hzxuzhonghu opened this issue 1 year ago • 9 comments

Task description:

We can add a copyright checker to prevent creating files without copyright https://github.com/kmesh-net/kmesh/blob/main/pkg/utils/exec.go#L1-L14

And for .c .h files, https://github.com/kmesh-net/kmesh/blob/main/bpf/deserialization_to_bpf_map/deserialization_to_bpf_map.c#L2

Solution:

Who can join or take the task:

The good first issue is intended for first-time contributors to get started on his/her contributor journey.

After a contributor has successfully completed 1-2 good first issue's, they should be ready to move on to help wanted items, saving the remaining good first issue for other new contributors.

How to join or take the task:

Just reply on the issue with the message /assign in a separate line.

Then, the issue will be assigned to you.

How to ask for help:

If you need help or have questions, please feel free to ask on this issue. The issue author or other members of the community will guide you through the contribution process.

hzxuzhonghu avatar Sep 14 '24 02:09 hzxuzhonghu

/assign @yuluo-yx

yuluo-yx avatar Sep 15 '24 07:09 yuluo-yx

hi @hzxuzhonghu I see that the copyright check ci is already in the code.

https://github.com/yuluo-yx/kmesh/blob/53caaa81015ea23eff89ff41a7be9a7bf0ae115d/.github/workflows/main.yml#L31

yuluo-yx avatar Sep 15 '24 07:09 yuluo-yx

Yeah. But i kind of remember it did not fail this pr https://github.com/kmesh-net/kmesh/pull/853#discussion_r1759636317

hzxuzhonghu avatar Sep 18 '24 01:09 hzxuzhonghu

Yeah. But i kind of remember it did not fail this pr #853 (comment)

This script may not be easy to use, I can refactor it using skywalking-eyes.

yuluo-yx avatar Sep 18 '24 13:09 yuluo-yx

IIRC hack/copyright-check.sh is missing some dir check

hzxuzhonghu avatar Sep 19 '24 01:09 hzxuzhonghu

cc @yuluo-yx

hzxuzhonghu avatar Sep 29 '24 07:09 hzxuzhonghu

cc @yuluo-yx

get, I will try to update.

yuluo-yx avatar Sep 29 '24 07:09 yuluo-yx

@hzxuzhonghu I deleted /pkg/controller/workloader/common.go locally and the shell script is fine, it works fine

image

image

maybe we don’t need to update?

yuluo-yx avatar Sep 29 '24 09:09 yuluo-yx

go_dirs="$ROOT_DIR/pkg"
c_dirs="$ROOT_DIR/bpf"

From the script, we can see it only checks these two dirs. That;s not enough, we have many other packages

hzxuzhonghu avatar Sep 30 '24 01:09 hzxuzhonghu

@hzxuzhonghu I've finished this issue, you can close it.

I am very interested in cloud native and traffic management. If you have other good questions or simple tasks, you can assign them to me and I will try to do them. Thank you very much 🤔

yuluo-yx avatar Oct 08 '24 12:10 yuluo-yx

Thank you /close

LiZhenCheng9527 avatar Oct 08 '24 12:10 LiZhenCheng9527

@LiZhenCheng9527: Closing this issue.

In response to this:

Done /close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

kmesh-bot avatar Oct 08 '24 12:10 kmesh-bot