Skip to content

Ci: Add golangci lit workflow #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Run golangci-lint

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
lint:
name: Run golangci-lint
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Print All environment variables
run: env | sort

- name: Set up Go
uses: actions/setup-go@v5

- name: Install golangci-lint
uses: golangci/golangci-lint-action@v7
with:
version: latest

- name: Run golangci-lint
run: golangci-lint run ./...
File renamed without changes.
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,8 @@ go.work.sum

/conf/remote/

gs/examples/bookman/.cover/
gs/examples/bookman/conf/
gs/examples/bookman/log/*.log
gs/examples/bookman/.cover/covcounters.*
gs/examples/bookman/.cover/covmeta.*
gs/examples/bookman/.cover/cover.txt

coverage.txt
72 changes: 36 additions & 36 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,3 @@
# 贡献者行为准则

首先,感谢你关注并支持 Go-Spring 项目!

为营造一个开放、友善、包容和专业的社区氛围,我们制定了本行为准则。无论你是报告问题、提交代码、参与讨论,还是以其他形式参与项目,都请遵循以下准则。

## 我们的承诺

我们承诺为每一位参与者提供一个免受骚扰、歧视和攻击性行为干扰的环境。我们欢迎来自不同背景、经验和身份的贡献者,共同建设一个多元、包容的社区。

## 倡导的行为

- 保持尊重、礼貌的沟通方式;
- 乐于接受建设性的意见与反馈;
- 尊重不同的观点与技术选择;
- 在协作中体现耐心与包容;
- 积极参与,共建积极向上的社区氛围。

## 不被接受的行为

- 使用歧视性、侮辱性或攻击性的言语与行为;
- 进行人身攻击、骚扰或威胁;
- 发布淫秽内容或不当链接;
- 蓄意干扰他人正常贡献;
- 冒充他人或侵犯他人隐私。

## 执行与维护

项目维护者有权也有责任删除、修改或拒绝任何违反行为准则的评论、提交、代码、Wiki 编辑、Issue 或其他形式的贡献内容,必要时可采取进一步措施。

## 如何报告问题

若你遇到违反行为准则的情况,请通过电子邮件联系项目维护者,或通过 Issue 匿名举报。我们承诺认真对待每一份举报,并确保信息保密。

---

# Contributor Code of Conduct

Thank you for your interest in and support of the Go-Spring project!
Expand Down Expand Up @@ -73,3 +37,39 @@ further action as necessary.

If you witness or experience a violation of this Code of Conduct, please contact the maintainers via email or submit an
anonymous issue. All reports will be handled with discretion and taken seriously.

---

# 贡献者行为准则

首先,感谢你关注并支持 Go-Spring 项目!

为营造一个开放、友善、包容和专业的社区氛围,我们制定了本行为准则。无论你是报告问题、提交代码、参与讨论,还是以其他形式参与项目,都请遵循以下准则。

## 我们的承诺

我们承诺为每一位参与者提供一个免受骚扰、歧视和攻击性行为干扰的环境。我们欢迎来自不同背景、经验和身份的贡献者,共同建设一个多元、包容的社区。

## 倡导的行为

- 保持尊重、礼貌的沟通方式;
- 乐于接受建设性的意见与反馈;
- 尊重不同的观点与技术选择;
- 在协作中体现耐心与包容;
- 积极参与,共建积极向上的社区氛围。

## 不被接受的行为

- 使用歧视性、侮辱性或攻击性的言语与行为;
- 进行人身攻击、骚扰或威胁;
- 发布淫秽内容或不当链接;
- 蓄意干扰他人正常贡献;
- 冒充他人或侵犯他人隐私。

## 执行与维护

项目维护者有权也有责任删除、修改或拒绝任何违反行为准则的评论、提交、代码、Wiki 编辑、Issue 或其他形式的贡献内容,必要时可采取进一步措施。

## 如何报告问题

若你遇到违反行为准则的情况,请通过电子邮件联系项目维护者,或通过 Issue 匿名举报。我们承诺认真对待每一份举报,并确保信息保密。
2 changes: 1 addition & 1 deletion conf/bind_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func PointConverter(val string) (image.Point, error) {
}

func PointSplitter(str string) ([]string, error) {
if !(strings.HasPrefix(str, "(") && strings.HasSuffix(str, ")")) {
if !strings.HasPrefix(str, "(") || !strings.HasSuffix(str, ")") {
return nil, errors.New("split error")
}
var ret []string
Expand Down
Loading
Loading