mirror of
https://gitea.com/gitea/docs.git
synced 2026-07-22 11:17:51 +00:00
Fix documents for development and bug report (#18249)
This commit is contained in:
@@ -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.
|
version is {{< min-node-version >}} and the latest LTS version is recommended.
|
||||||
|
|
||||||
**Note**: When executing make tasks that require external tools, like
|
**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
|
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
|
on the executable path. If you don't add the go bin directory to the
|
||||||
executable path you will have to manage this yourself.
|
executable path you will have to manage this yourself.
|
||||||
|
|
||||||
**Note 2**: Go version {{< min-go-version >}} or higher is required; however, it is important
|
**Note 2**: Go version {{< min-go-version >}} or higher is required.
|
||||||
to note that our continuous integration will check that the formatting of the
|
Gitea uses `gofmt` to format source code. However, the results of
|
||||||
source code is not changed by `gofmt` using `make fmt-check`. Unfortunately,
|
`gofmt` can differ by the version of `go`. Therefore it is
|
||||||
the results of `gofmt` can differ by the version of `go`. It is therefore
|
|
||||||
recommended to install the version of Go that our continuous integration 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
|
## 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
|
### Formatting, code analysis and spell check
|
||||||
|
|
||||||
Our continuous integration will reject PRs that are not properly formatted, fail
|
Our continuous integration will reject PRs that fail the code linters (including format check, code analysis and spell check).
|
||||||
code analysis or spell check.
|
|
||||||
|
|
||||||
You should format your code with `go fmt` using:
|
You should format your code:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
make fmt
|
make fmt
|
||||||
```
|
```
|
||||||
|
|
||||||
and can test whether your changes would match the results with:
|
and lint the source code:
|
||||||
|
|
||||||
```bash
|
```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 `gofmt` 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
|
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
|
server as mentioned above.
|
||||||
format differently - this may be different from the CI server version.
|
|
||||||
|
|
||||||
### Working on JS and CSS
|
### Working on JS and CSS
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user