Skip to content

Commit

Permalink
chore: add missing license header, update Makefile (#120)
Browse files Browse the repository at this point in the history
<!--  感谢您提交一个 Pull Request!

-->
#### 自查 PR 结构
<!--
自查通过后在方框中打一个 x 就可以勾选,如果需要访问关于commit 签名的信息,可以访问

https://docs.github.com/zh/authentication/managing-commit-signature-verification/signing-commits

一个可能的标题示例: `[BREAKING CHANGE] feat(core): add new feature`
-->
- [x] PR 标题符合这个格式: \<type\>(optional scope): \<description\>
- [x] 此 PR 标题的描述以用户为导向,足够清晰,其他人可以理解。
- [x] 我已经对所有 commit 提供了签名(GPG 密钥签名、SSH 密钥签名)

- [ ] 这个 PR 属于强制变更/破坏性更改
> 如果是,请在 PR 标题中添加 `BREAKING CHANGE` 前缀,并在 PR 描述中详细说明。

#### 这个 PR 的类型是什么?
<!--
添加以下类型的一种:

build: 影响构建系统或外部依赖项的更改 (常用 scope: gulp, broccoli, npm)
ci: 更改我们的 CI 配置文件和脚本 (常用 scope: Travis, Circle, BrowserStack, SauceLabs)
docs: 只包含文档的更改
feat: 一个新的特性
optimize: 对已有代码的优化
fix: 修正 bug
perf: 对代码的性能提升
refactor: 重构,或代码更改既没有修复错误也没有添加功能
style: 不影响代码含义的更改 (空白行/空格, 格式优化, 缺失的分号, etc.)
test: 添加缺失的测试或更正现有的测试
chore: 构建过程或辅助工具和库(如文档生成)的变更
-->

chore

#### 这个 PR 做了什么 / 我们为什么需要这个 PR?
<!--
对于每次的Code Review,我们都需要一个清晰的 PR 描述,以便 Reviewer 能够理解 PR 的目的。
这是对 Reviewer 一个很好的引导,减轻 Review 的难度和压力,同时便于 PR 更快的通过
-->

补充在 #116 中没有添加的 test license header,同时在 Makefile 中的 verify 方法添加 license
检查

#### (可选)这个 PR 解决了哪个/些 issue?
<!--
PR 合并时会自动关闭链接问题
用法: `Fixes #<issue number>`, 或者 `Fixes (粘贴 issue 链接)`.
-->

#### 对 Reviewer 预留的一些提醒
  • Loading branch information
ozline authored Dec 1, 2024
1 parent 75b93bd commit 1d07a73
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,9 @@ lint:
vulncheck:
govulncheck ./...

# 一键修正规范并执行代码检查
# 一键修正规范并执行代码检查,同时运行 license 检查
.PHONY: verify
verify: vet fmt import lint vulncheck
verify: license vet fmt import lint vulncheck

# 补齐 license
.PHONY: license
Expand Down
16 changes: 16 additions & 0 deletions api/rpc/classroom_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
Copyright 2024 The west2-online Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package rpc

import (
Expand Down
16 changes: 16 additions & 0 deletions api/rpc/course_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
Copyright 2024 The west2-online Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package rpc

import (
Expand Down
16 changes: 16 additions & 0 deletions api/rpc/user_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
Copyright 2024 The west2-online Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package rpc

import (
Expand Down

0 comments on commit 1d07a73

Please sign in to comment.