Fix documents for development and bug report (#18249)
This commit is contained in:
parent
17b2079f3e
commit
eaf09a5368
4 changed files with 27 additions and 26 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue