Gather suggestions for gitea-vet #5248

Closed
opened 2025-11-02 06:19:06 -06:00 by GiteaMirror · 7 comments
Owner

Originally created by @jolheiser on GitHub (Apr 16, 2020).

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.

Originally created by @jolheiser on GitHub (Apr 16, 2020). Now that we implemented a custom [vet tool](https://gitea.com/jolheiser/gitea-vet) 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](https://mattermost.com/blog/maintaining-consistency-in-codebases-with-go-vet/) about how they use [their vet tool](https://github.com/mattermost/mattermost-govet). As an example, currently the tool checks for [license headers in files](https://github.com/go-gitea/gitea/blob/9ffa89249e707d2f977a6fb11a1b56a527fa2640/main.go#L1-L4) and [import ordering](https://github.com/go-gitea/gitea/blob/9ffa89249e707d2f977a6fb11a1b56a527fa2640/main.go#L10-L24).
GiteaMirror added the issue/staletopic/build labels 2025-11-02 06:19:07 -06:00
Author
Owner

@6543 commented on GitHub (Apr 17, 2020):

Check If we have xorm Insert statements witch could posibly add nil slices

@6543 commented on GitHub (Apr 17, 2020): Check If we have xorm Insert statements witch could posibly add nil slices
Author
Owner

@6543 commented on GitHub (Apr 21, 2020):

in models: unexpoted function should always use e Engine and never x so just check if there is a
*= x.* in a func

@6543 commented on GitHub (Apr 21, 2020): in models: unexpoted function should always use e Engine and never x so just check if there is a `*= x.*` in a func
Author
Owner

@6543 commented on GitHub (Apr 21, 2020):

If a exported function has Init a new Session from this line on only dont allow usage of x either

@6543 commented on GitHub (Apr 21, 2020): If a exported function has Init a new Session from this line on only dont allow usage of x either
Author
Owner

@6543 commented on GitHub (Apr 21, 2020):

common xorm bugs ☝️

@6543 commented on GitHub (Apr 21, 2020): common xorm bugs ☝️
Author
Owner

@lunny commented on GitHub (Apr 25, 2020):

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.

@lunny commented on GitHub (Apr 25, 2020): 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`.
Author
Owner

@stale[bot] commented on GitHub (Jun 24, 2020):

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.

@stale[bot] commented on GitHub (Jun 24, 2020): 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.
Author
Owner

@jolheiser commented on GitHub (Jun 24, 2020):

The above have been moved to the gitea-vet repo, so I will close this issue. More issues there are welcome. 🙂

@jolheiser commented on GitHub (Jun 24, 2020): The above have been moved to the [gitea-vet repo](https://gitea.com/gitea/gitea-vet), so I will close this issue. More issues there are welcome. 🙂
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#5248