fix(lint): exempt shift counts, SETcc and ABIInternal from false positives

Assisted-by: GLM 5.3 Flash
This commit is contained in:
2026-09-20 11:40:39 +02:00
parent c66a47973a
commit cc6e416c59
4 changed files with 348 additions and 8 deletions
+6
View File
@@ -21,6 +21,12 @@ import (
// The check requires a parseable signature; functions without one, and
// functions whose parameters are all covered by frame reads, stay silent.
func checkABI0Args(t *ast.Text) []Diagnostic {
// An explicit <ABIInternal> TEXT reads its arguments from the register
// file by declaration (runtime·memmove<ABIInternal> is the canonical
// example), so the ABI0 frame contract does not apply to it.
if t.Name != nil && t.Name.ABI != "" {
return nil
}
params, ok := abiParamNames(t.Doc)
if !ok || len(params) == 0 {
return nil