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
Gusted
7d1770cd71
Use correct count for `NumOpenIssues` ( #19980 )
...
- Don't specify the field in `Count` instead use `Cols` for this.
- Call `log.Error` when a error occur.
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2022-06-16 10:51:34 +08:00
Lunny Xiao
fd7d83ace6
Move almost all functions' parameter db.Engine to context.Context ( #19748 )
...
* Move almost all functions' parameter db.Engine to context.Context
* remove some unnecessary wrap functions
2022-05-20 22:08:52 +08:00
wxiaoguang
994257d266
Add missing `sorting` column in `project_issue` table ( #19635 )
2022-05-06 22:25:59 +08:00
Lunny Xiao
b8911fb456
Use a struct as test options ( #19393 )
...
* Use a struct as test options
* Fix name
* Fix test
2022-04-14 21:58:21 +08:00
Lunny Xiao
bd97736b9c
Move project files into models/project sub package ( #17704 )
...
* Move project files into models/project sub package
* Fix test
* Fix test
* Fix test
* Fix build
* Fix test
* Fix template bug
* Fix bug
* Fix lint
* Fix test
* Fix import
* Improve codes
Co-authored-by: 6543 <6543@obermui.de>
2022-03-29 22:16:31 +08:00