-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Fix documents for development and bug report #18249
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
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -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: | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The original text is better. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay |
||||||
|
||||||
```bash | ||||||
make fmt | ||||||
``` | ||||||
|
||||||
and can test whether your changes would match the results with: | ||||||
and lint the source code: | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The original text is better. |
||||||
|
||||||
```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 | ||||||
wxiaoguang marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
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. | ||||||
wxiaoguang marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
|
||||||
### Working on JS and CSS | ||||||
|
||||||
|
Uh oh!
There was an error while loading. Please reload this page.