mirror of
				https://gitea.com/gitea/act_runner.git
				synced 2025-10-31 12:57:56 +01:00 
			
		
		
		
	ci(lint): refactor code for clarity and linting compliance (#289)
- Removed `deadcode`, `structcheck`, and `varcheck` linters from `.golangci.yml` - Fixed a typo in a comment in `daemon.go` - Renamed `defaultActionsUrl` to `defaultActionsURL` in `exec.go` - Removed unnecessary else clause in `exec.go` and `runner.go` - Simplified variable initialization in `exec.go` - Changed function name from `getHttpClient` to `getHTTPClient` in `http.go` - Removed unnecessary else clause in `labels_test.go` Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com> Reviewed-on: https://gitea.com/gitea/act_runner/pulls/289 Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com> Co-committed-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
		| @@ -1,14 +1,11 @@ | ||||
| linters: | ||||
|   enable: | ||||
|     - gosimple | ||||
|     - deadcode | ||||
|     - typecheck | ||||
|     - govet | ||||
|     - errcheck | ||||
|     - staticcheck | ||||
|     - unused | ||||
|     - structcheck | ||||
|     - varcheck | ||||
|     - dupl | ||||
|     #- gocyclo # The cyclomatic complexety of a lot of functions is too high, we should refactor those another time. | ||||
|     - gofmt | ||||
| @@ -112,7 +109,6 @@ issues: | ||||
|         - gocritic | ||||
|     - linters: | ||||
|         - unused | ||||
|         - deadcode | ||||
|       text: "swagger" | ||||
|     - path: contrib/pr/checkout.go | ||||
|       linters: | ||||
| @@ -154,9 +150,6 @@ issues: | ||||
|     - path: cmd/dump.go | ||||
|       linters: | ||||
|         - dupl | ||||
|     - path: services/webhook/webhook.go | ||||
|       linters: | ||||
|         - structcheck | ||||
|     - text: "commentFormatting: put a space between `//` and comment text" | ||||
|       linters: | ||||
|         - gocritic | ||||
|   | ||||
		Reference in New Issue
	
	Block a user