diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index ffa860b..0ab3d2f 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -39,7 +39,7 @@ jobs: reporter: github-pr-review # Report all results. filter_mode: nofilter - # Exit with 1 when it find at least one finding. + # Exit with 1 when it finds at least one finding. fail_on_error: true # Set staticcheck flags staticcheck_flags: -checks=inherit,-SA1029 diff --git a/.gitignore b/.gitignore index 644df37..398f12b 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,13 @@ # Dependency directories (remove the comment below to include it) # vendor/ +# Go workspace file +go.work +go.work.sum + +# env file +.env + # the result of the go build output* output/* diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d37a2c1..a763511 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,14 +1,14 @@ # How to Contribute ## Your First Pull Request -We use github for our codebase. You can start by reading [How To Pull Request](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests). +We use GitHub for our codebase. You can start by reading [How To Pull Request](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests). ## Branch Organization We use [git-flow](https://nvie.com/posts/a-successful-git-branching-model/) as our branch organization, as known as [FDD](https://en.wikipedia.org/wiki/Feature-driven_development) ## Bugs ### 1. How to Find Known Issues -We are using [Github Issues](https://github.com/cloudwego/goref/issues) for our public bugs. We keep a close eye on this and try to make it clear when we have an internal fix in progress. Before filing a new task, try to make sure your problem doesn’t already exist. +We are using [GitHub Issues](https://github.com/cloudwego/goref/issues) for our public bugs. We keep a close eye on this and try to make it clear when we have an internal fix in progress. Before filing a new task, try to make sure your problem doesn’t already exist. ### 2. Reporting New Issues Providing a reduced test code is a recommended way for reporting issues. Then can placed in: @@ -47,9 +47,5 @@ Before you submit your Pull Request (PR) consider the following guidelines: - Maybe you need familiar with [Actions](https://github.com/features/actions)(our default workflow tool). ## Code Style Guides -Also see [Pingcap General advice](https://pingcap.github.io/style-guide/general.html). - -Good resources: - [Effective Go](https://golang.org/doc/effective_go) - [Go Code Review Comments](https://github.com/golang/go/wiki/CodeReviewComments) -- [Uber Go Style Guide](https://github.com/uber-go/guide/blob/master/style.md) diff --git a/check_branch_name.sh b/check_branch_name.sh deleted file mode 100755 index 1876fc0..0000000 --- a/check_branch_name.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash - -current=$(git status | head -n1 | sed 's/On branch //') -name=${1:-$current} -if [[ ! $name =~ ^(((opt(imize)?|feat(ure)?|(bug|hot)?fix|test|refact(or)?|ci)/.+)|(main|develop)|(release-v[0-9]+\.[0-9]+)|(release/v[0-9]+\.[0-9]+\.[0-9]+(-[a-z0-9.]+(\+[a-z0-9.]+)?)?)|revert-[a-z0-9]+)$ ]]; then - echo "branch name '$name' is invalid" - exit 1 -else - echo "branch name '$name' is valid" -fi