New Check: XORM #3
Labels
No Label
breaking
bug
build
duplicate
enhancement
feature
help wanted
invalid
question
skip-changelog
wontfix
No Milestone
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: gitea/gitea-vet#3
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Engine
to never usex
x
after declarationCheck missed
sess.Begin
if invokedsess.Commit
on the same function.if there is a engine in a function ... check if Exported Functions are used witch have a unexported version too, if so ling -> fail
-> https://github.com/go-gitea/gitea/pull/13092
So I just realised that you're being passed an
*analysis.Pass
object that has the files of the package already parsed as goast.File
s meaning that you don't really need to drop down to callinggo list
externally - you can get it from each file.In fact that also means that we could literally find the naughty line of code that caused the import and print it out to the user potentially using
ast.Walk
.In any case implementing these checks would require that level of code.
In some ways, dealing with and preventing both of these problems by destroying models.x would likely be less work overall. So as fun as coding with the ast might be that might actually be the better option.