gitea/modules/util
Wim cb50375e2b
Add more linters to improve code readability ()
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)
..
filebuffer Add Package Registry ()
compare.go Simplify parameter types ()
io.go Add more linters to improve code readability ()
legacy.go Remove legacy `unknwon/com` package ()
legacy_test.go Remove legacy `unknwon/com` package ()
paginate.go [API] Add pagination to ListBranches ()
paginate_test.go format with gofumpt ()
path.go Refactor git module, make Gitea use internal git config ()
path_test.go format with gofumpt ()
remove.go Make cancel from CatFileBatch and CatFileBatchCheck wait for the command to end ()
sanitize.go Use a more general (and faster) method to sanitize URLs with credentials ()
sanitize_test.go Use a more general (and faster) method to sanitize URLs with credentials ()
sec_to_time.go Refactor SecToTime() function ()
sec_to_time_test.go Refactor SecToTime() function ()
shellquote.go format with gofumpt ()
shellquote_test.go Fix various documentation, user-facing, and source comment typos ()
slice.go Cleanup protected branches when deleting users & teams ()
string.go Remove legacy `unknwon/com` package ()
string_test.go Remove legacy `unknwon/com` package ()
timer.go Prevent timer leaks in Workerpool and others ()
truncate.go format with gofumpt ()
truncate_test.go Fix a panic in NotifyCreateIssueComment (caused by string truncation) ()
url.go Re-attempt to delete temporary upload if the file is locked by another process ()
util.go Prettify number of issues ()
util_test.go Fix copy/paste of empty lines ()