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 )
3 years ago
John Olheiser
c59afa752d
Allow mocking timeutil ( #17354 )
...
Signed-off-by: jolheiser <john.olheiser@gmail.com>
3 years ago
Cirno the Strongest
bbe13b60cd
Fix timezone on issue deadline ( #11697 )
...
* Fix timezone on issue deadline
* FormatDate
Co-authored-by: zeripath <art27@cantab.net>
5 years ago
Lunny Xiao
85202d4784
Display ui time with customize time location ( #7792 )
...
* display ui time with customize time location
* fix lint
* rename UILocation to DefaultUILocation
* move time related functions to modules/timeutil
* fix tests
* fix tests
* fix build
* fix swagger
5 years ago
Lunny Xiao
769ab1e424
fix gpg expired bug when time is zero ( #3584 )
7 years ago
Lunny Xiao
f94c1b3943
Improvements for supporting UI Location ( #3146 )
...
* improvements for supporting UI Location
* improved the comment
7 years ago
Lunny Xiao
f2e20c81b6
Refactor struct's time to remove unnecessary memory usage ( #3142 )
...
* refactor struct's time to remove unnecessary memory usage
* use AsTimePtr simple code
* fix tests
* fix time compare
* fix template on gpg
* use AddDuration instead of Add
7 years ago