A golang vet tool for gitea development
Go to file
Andrew Thornton 7c98703580 If you open a session either return it or close it (#16)
If you call `sess := x.NewSession()` you must call `sess.Close()` or return the session.

This is not quite completely perfect for example if you return the output of x.NewSession() immediately it will falsely claim that you're not closing it. However it shows the beginnings of how to do it.

Signed-off-by: Andrew Thornton <art27@cantab.net>

close #15

Reviewed-on: gitea/gitea-vet#16
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-by: 6543 <6543@obermui.de>
Co-authored-by: Andrew Thornton <art27@cantab.net>
Co-committed-by: Andrew Thornton <art27@cantab.net>
2021-04-13 06:12:04 +08:00
checks If you open a session either return it or close it (#16) 2021-04-13 06:12:04 +08:00
.changelog.yml Changelog 0.2.0 (#7) 2020-07-20 13:45:04 +00:00
.drone.yml Add CI (#1) 2020-04-04 21:12:39 +00:00
.gitignore Initial commit 2020-03-24 22:43:07 -05:00
.golangci.yml Add CI (#1) 2020-04-04 21:12:39 +00:00
CHANGELOG.md Changelog v0.2.1 (#10) 2020-08-15 13:27:32 +00:00
go.mod Correct Import Paths (#6) 2020-07-20 13:29:15 +00:00
go.sum Initial commit 2020-03-24 22:43:07 -05:00
LICENSE Initial commit 2020-03-24 22:43:07 -05:00
main.go If you open a session either return it or close it (#16) 2021-04-13 06:12:04 +08:00
Makefile Add CI (#1) 2020-04-04 21:12:39 +00:00
README.md Add migrations check (#5) 2020-05-31 18:38:55 +00:00

gitea-vet

Build Status

go vet tool for Gitea

Analyzer Description
Imports Checks for import sorting. stdlib->code.gitea.io->other
License Checks file headers for some form of Copyright...YYYY...Gitea/Gogs
Migrations Checks for black-listed packages in code.gitea.io/gitea/models/migrations