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)
|
2 years ago |
Lunny Xiao
|
d91d4db344
|
Move tests as seperate sub packages to reduce duplicated file names (#19951)
|
2 years ago |
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
|
3 years ago |
Lunny Xiao
|
d81e31ad78
|
Move org functions (#19753)
* Move org functions
* Fix comment
|
3 years ago |
zuzuviewer
|
77e9346342
|
Fix duplicate entry error when add team member (#19702)
|
3 years ago |
6543
|
06e4687cec
|
more context for models (#19511)
make more usage of context, to have more db transaction in one session
(make diff of #9307 smaller)
|
3 years ago |
qwerty287
|
ae6a52440a
|
Fix panic in team repos API (#19431)
* Fix panic in team repos API
* Fix pagination
* fmt
|
3 years ago |
Lunny Xiao
|
b8911fb456
|
Use a struct as test options (#19393)
* Use a struct as test options
* Fix name
* Fix test
|
3 years ago |
Lunny Xiao
|
89b9d42f08
|
Fix broken of team create (#19288)
* Fix broken of team create
* Update models/organization/team.go
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
|
3 years ago |
6543
|
3e88af898a
|
Make git.OpenRepository accept Context (#19260)
* OpenRepositoryCtx -> OpenRepository
* OpenRepository -> openRepositoryWithDefaultContext, only for internal usage
|
3 years ago |
Lunny Xiao
|
b06b9a056c
|
Move organization related structs into sub package (#18518)
* Move organization related structs into sub package
* Fix test
* Fix lint
* Move more functions into sub packages
* Fix bug
* Fix test
* Update models/organization/team_repo.go
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
* Apply suggestions from code review
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
* Fix fmt
* Follow suggestion from @Gusted
* Fix test
* Fix test
* Fix bug
* Use ctx but db.DefaultContext on routers
* Fix bug
* Fix bug
* fix bug
* Update models/organization/team_user.go
* Fix bug
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
|
3 years ago |