summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2022-01-13 10:58:46 +0800
committerGitHub <noreply@github.com>2022-01-13 10:58:46 +0800
commiteaf09a53687844603dfd1bd3b88ed44d07f8e094 (patch)
treeab044ec30483cde5ae21402c8d7b316195c555ea /docs
parent17b2079f3e06b95ab1ad752ed1218795538a1606 (diff)
downloadgitea-eaf09a53687844603dfd1bd3b88ed44d07f8e094.tar.gz
gitea-eaf09a53687844603dfd1bd3b88ed44d07f8e094.zip
Fix documents for development and bug report (#18249)
Diffstat (limited to 'docs')
-rw-r--r--docs/content/doc/developers/hacking-on-gitea.en-us.md28
1 files changed, 14 insertions, 14 deletions
diff --git a/docs/content/doc/developers/hacking-on-gitea.en-us.md b/docs/content/doc/developers/hacking-on-gitea.en-us.md
index bae69d0058..5481a2f1fe 100644
--- a/docs/content/doc/developers/hacking-on-gitea.en-us.md
+++ b/docs/content/doc/developers/hacking-on-gitea.en-us.md
@@ -29,17 +29,16 @@ required to build the JavaScript and CSS files. The minimum supported Node.js
version is {{< min-node-version >}} and the latest LTS version is recommended.
**Note**: When executing make tasks that require external tools, like
-`make misspell-check`, Gitea will automatically download and build these as
+`make watch-backend`, Gitea will automatically download and build these as
necessary. To be able to use these you must have the `"$GOPATH"/bin` directory
on the executable path. If you don't add the go bin directory to the
executable path you will have to manage this yourself.
-**Note 2**: Go version {{< min-go-version >}} or higher is required; however, it is important
-to note that our continuous integration will check that the formatting of the
-source code is not changed by `gofmt` using `make fmt-check`. Unfortunately,
-the results of `gofmt` can differ by the version of `go`. It is therefore
+**Note 2**: Go version {{< min-go-version >}} or higher is required.
+Gitea uses `gofmt` to format source code. However, the results of
+`gofmt` can differ by the version of `go`. Therefore it is
recommended to install the version of Go that our continuous integration is
-running. As of last update, it should be Go version {{< go-version >}}.
+running. As of last update, the Go version should be {{< go-version >}}.
## Installing Make
@@ -149,25 +148,26 @@ On macOS, watching all backend source files may hit the default open files limit
### Formatting, code analysis and spell check
-Our continuous integration will reject PRs that are not properly formatted, fail
-code analysis or spell check.
+Our continuous integration will reject PRs that fail the code linters (including format check, code analysis and spell check).
-You should format your code with `go fmt` using:
+You should format your code:
```bash
make fmt
```
-and can test whether your changes would match the results with:
+and lint the source code:
```bash
-make fmt-check # which runs make fmt internally
+# lint both frontend and backend code
+make lint
+# lint only backend code
+make lint-backend
```
-**Note**: The results of `go fmt` are dependent on the version of `go` present.
+**Note**: The results of `gofmt` are dependent on the version of `go` present.
You should run the same version of go that is on the continuous integration
-server as mentioned above. `make fmt-check` will only check if your `go` would
-format differently - this may be different from the CI server version.
+server as mentioned above.
### Working on JS and CSS