Skip to content

Commit eaf09a5

Browse files
authored
Fix documents for development and bug report (go-gitea#18249)
1 parent 17b2079 commit eaf09a5

File tree

4 files changed

+27
-26
lines changed

4 files changed

+27
-26
lines changed

.github/ISSUE_TEMPLATE/bug-report.yaml

+9-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Bug Report
2-
description: Found something you weren't expecting? Report it here!
2+
description: Found something you weren't expecting? Report it here!
33
body:
44
- type: markdown
55
attributes:
@@ -11,15 +11,16 @@ body:
1111
1. Please speak English, this is the language all maintainers can speak and write.
1212
2. Please ask questions or configuration/deploy problems on our Discord
1313
server (https://discord.gg/gitea) or forum (https://discourse.gitea.io).
14-
3. Please take a moment to check that your issue doesn't already exist.
14+
3. Make sure you are using the latest release and
15+
take a moment to check that your issue hasn't been reported before.
1516
4. Make sure it's not mentioned in the FAQ (https://docs.gitea.io/en-us/faq)
1617
5. Please give all relevant information below for bug reports, because
1718
incomplete details will be handled as an invalid report.
1819
- type: input
1920
id: gitea-ver
2021
attributes:
2122
label: Gitea Version
22-
description: Gitea version (or commit reference) your instance is running
23+
description: Gitea version (or commit reference) of your instance
2324
validations:
2425
required: true
2526
- type: input
@@ -37,8 +38,8 @@ body:
3738
attributes:
3839
label: How are you running Gitea?
3940
description: |
40-
Please include information on whether you built gitea yourself, used one of our downloads, are using https://try.gitea.io or are using some other package
41-
Please also tell us how you are running gitea, e.g. if it is being run from docker, a command-line, systemd etc.
41+
Please include information on whether you built Gitea yourself, used one of our downloads, are using https://try.gitea.io or are using some other package
42+
Please also tell us how you are running Gitea, e.g. if it is being run from docker, a command-line, systemd etc.
4243
If you are using a package or systemd tell us what distribution you are using
4344
validations:
4445
required: true
@@ -67,7 +68,7 @@ body:
6768
- type: markdown
6869
attributes:
6970
value: |
70-
It really is important to provide pertinent logs
71+
It's really important to provide pertinent logs
7172
Please read https://docs.gitea.io/en-us/logging-configuration/#debugging-problems
7273
In addition, if your problem relates to git commands set `RUN_MODE=dev` at the top of app.ini
7374
- type: input
@@ -81,9 +82,9 @@ body:
8182
label: Description
8283
description: |
8384
Please provide a description of your issue here, with a URL if you were able to reproduce the issue (see above)
84-
If using a proxy or a CDN (e.g. CloudFlare) in front of gitea, please disable the proxy/CDN fully and connect to gitea directly to confirm the issue still persists without those services.
85+
If you are using a proxy or a CDN (e.g. Cloudflare) in front of Gitea, please disable the proxy/CDN fully and access Gitea directly to confirm the issue still persists without those services.
8586
- type: textarea
8687
id: screenshots
8788
attributes:
8889
label: Screenshots
89-
description: If this issue involves the Web Interface, please provide a screenshot or multiple screenshots
90+
description: If this issue involves the Web Interface, please provide one or more screenshots

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ clean:
231231

232232
.PHONY: fmt
233233
fmt:
234-
@echo "Running go fmt..."
234+
@echo "Running gitea-fmt(with gofmt)..."
235235
@$(GO) run build/code-batch-process.go gitea-fmt -s -w '{file-list}'
236236

237237
.PHONY: vet
@@ -280,7 +280,7 @@ errcheck:
280280

281281
.PHONY: fmt-check
282282
fmt-check:
283-
# get all go files and run go fmt on them
283+
# get all go files and run gitea-fmt (with gofmt) on them
284284
@diff=$$($(GO) run build/code-batch-process.go gitea-fmt -s -d '{file-list}'); \
285285
if [ -n "$$diff" ]; then \
286286
echo "Please run 'make fmt' and commit the result:"; \

build/code-batch-process.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ import (
2121
)
2222

2323
// Windows has a limitation for command line arguments, the size can not exceed 32KB.
24-
// So we have to feed the files to some tools (like gofmt/misspell`) batch by batch
24+
// So we have to feed the files to some tools (like gofmt/misspell) batch by batch
2525

26-
// We also introduce a `gitea-fmt` command, it does better import formatting than gofmt/goimports
26+
// We also introduce a `gitea-fmt` command, it does better import formatting than gofmt/goimports. `gitea-fmt` calls `gofmt` internally.
2727

2828
var optionLogVerbose bool
2929

docs/content/doc/developers/hacking-on-gitea.en-us.md

+14-14
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,16 @@ required to build the JavaScript and CSS files. The minimum supported Node.js
2929
version is {{< min-node-version >}} and the latest LTS version is recommended.
3030

3131
**Note**: When executing make tasks that require external tools, like
32-
`make misspell-check`, Gitea will automatically download and build these as
32+
`make watch-backend`, Gitea will automatically download and build these as
3333
necessary. To be able to use these you must have the `"$GOPATH"/bin` directory
3434
on the executable path. If you don't add the go bin directory to the
3535
executable path you will have to manage this yourself.
3636

37-
**Note 2**: Go version {{< min-go-version >}} or higher is required; however, it is important
38-
to note that our continuous integration will check that the formatting of the
39-
source code is not changed by `gofmt` using `make fmt-check`. Unfortunately,
40-
the results of `gofmt` can differ by the version of `go`. It is therefore
37+
**Note 2**: Go version {{< min-go-version >}} or higher is required.
38+
Gitea uses `gofmt` to format source code. However, the results of
39+
`gofmt` can differ by the version of `go`. Therefore it is
4140
recommended to install the version of Go that our continuous integration is
42-
running. As of last update, it should be Go version {{< go-version >}}.
41+
running. As of last update, the Go version should be {{< go-version >}}.
4342

4443
## Installing Make
4544

@@ -149,25 +148,26 @@ On macOS, watching all backend source files may hit the default open files limit
149148

150149
### Formatting, code analysis and spell check
151150

152-
Our continuous integration will reject PRs that are not properly formatted, fail
153-
code analysis or spell check.
151+
Our continuous integration will reject PRs that fail the code linters (including format check, code analysis and spell check).
154152

155-
You should format your code with `go fmt` using:
153+
You should format your code:
156154

157155
```bash
158156
make fmt
159157
```
160158

161-
and can test whether your changes would match the results with:
159+
and lint the source code:
162160

163161
```bash
164-
make fmt-check # which runs make fmt internally
162+
# lint both frontend and backend code
163+
make lint
164+
# lint only backend code
165+
make lint-backend
165166
```
166167

167-
**Note**: The results of `go fmt` are dependent on the version of `go` present.
168+
**Note**: The results of `gofmt` are dependent on the version of `go` present.
168169
You should run the same version of go that is on the continuous integration
169-
server as mentioned above. `make fmt-check` will only check if your `go` would
170-
format differently - this may be different from the CI server version.
170+
server as mentioned above.
171171

172172
### Working on JS and CSS
173173

0 commit comments

Comments
 (0)