Wim
cb50375e2b
Add more linters to improve code readability ( #19989 )
...
Add nakedret, unconvert, wastedassign, stylecheck and nolintlint linters to improve code readability
- nakedret - https://github.com/alexkohler/nakedret - nakedret is a Go static analysis tool to find naked returns in functions greater than a specified function length.
- unconvert - https://github.com/mdempsky/unconvert - Remove unnecessary type conversions
- wastedassign - https://github.com/sanposhiho/wastedassign - wastedassign finds wasted assignment statements.
- notlintlint - Reports ill-formed or insufficient nolint directives
- stylecheck - https://staticcheck.io/docs/checks/#ST - keep style consistent
- excluded: [ST1003 - Poorly chosen identifier](https://staticcheck.io/docs/checks/#ST1003 ) and [ST1005 - Incorrectly formatted error string](https://staticcheck.io/docs/checks/#ST1005 )
2022-06-20 12:02:49 +02:00
KN4CK3R
3f280f89e7
Update HTTP status codes to modern codes ( #18063 )
...
* 2xx/3xx/4xx/5xx -> http.Status...
* http.StatusFound -> http.StatusTemporaryRedirect
* http.StatusMovedPermanently -> http.StatusPermanentRedirect
2022-03-23 12:54:07 +08:00
Lunny Xiao
a666829a37
Move user related model into models/user ( #17781 )
...
* Move user related model into models/user
* Fix lint for windows
* Fix windows lint
* Fix windows lint
* Move some tests in models
* Merge
2021-11-24 17:49:20 +08:00
Gusted
c98dd7a3e0
Remove unnecessary variable assignments ( #17695 )
...
* Remove unnecessary variable assignments
As title
* enable ineffassign
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2021-11-18 09:33:06 +08:00
wxiaoguang
81926d61db
Decouple unit test, remove intermediate `unittestbridge` package ( #17662 )
...
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2021-11-16 16:53:21 +08:00
Lunny Xiao
a4bfef265d
Move db related basic functions to models/db ( #17075 )
...
* Move db related basic functions to models/db
* Fix lint
* Fix lint
* Fix test
* Fix lint
* Fix lint
* revert unnecessary change
* Fix test
* Fix wrong replace string
* Use *Context
* Correct committer spelling and fix wrong replaced words
Co-authored-by: zeripath <art27@cantab.net>
2021-09-19 19:49:59 +08:00
zeripath
055f6d2296
Fix "data race" in testlogger ( #9159 )
...
* Fix data race in testlogger
* Update git_helper_for_declarative_test.go
2019-11-26 01:21:37 +02:00
Ethan Koenig
e59adcde65
Use httptest in integration tests ( #3080 )
2017-12-04 00:46:01 +02:00
Lauris BH
1ec4dc6c1d
Fix so that user can still fork his own repository to owned organizations ( #2699 )
...
* Fix so that user can still fork his own repository to his organizations
* Fix to only use owned organizations
* Add integration test for forking own repository to owned organization
2017-10-15 18:06:07 +03:00
Ethan Koenig
f1adaef458
Less verbose integration tests ( #2123 )
...
* Helper functions for intergration test boilerplate
2017-07-07 21:36:47 +02:00
Ethan Koenig
f64c232953
Improve integration test helper functions ( #2049 )
...
Set request headers in helper functions, and new helper for requests with string-formatted URLs
2017-06-25 08:15:42 +08:00
Bo-Yi Wu
90f9bb12c6
fix golint error and rename func for suggestion. ( #1997 )
...
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-06-17 11:29:59 -05:00
Ethan Koenig
ce9b86082c
Consolidate boilerplate in integration tests ( #1979 )
2017-06-17 12:49:45 +08:00
Mura Li
01322af2e8
Add integration test for pull-request merge ( #1912 )
2017-06-15 19:20:39 +08:00
Ethan Koenig
61716bd8f7
Display URLs in integration test logs ( #1924 )
2017-06-09 19:41:36 -05:00
Mura Li
30a831698e
Add integration test for repository forking
2017-06-07 20:02:37 +08:00