Closed jolheiser closed 4 years ago
Check If we have xorm Insert statements witch could posibly add nil slices
in models: unexpoted function should always use e Engine and never x so just check if there is a
*= x.*
in a func
If a exported function has Init a new Session from this line on only dont allow usage of x either
common xorm bugs ☝️
That is, in a function under models
, when the first param is e Engine
, then it and all invoked functions should not have a reference to x
.
This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.
The above have been moved to the gitea-vet repo, so I will close this issue. More issues there are welcome. 🙂
Now that we implemented a custom vet tool I'd like to open an issue to gather ideas on things to add to it.
For reference, I took the inspiration from a mattermost blog post about how they use their vet tool.
As an example, currently the tool checks for license headers in files and import ordering.