feat(lint): nonportable amd64 register name rule

This commit is contained in:
2026-08-29 13:39:22 +02:00
parent d75e6bcae6
commit c92e6bed3a
3 changed files with 119 additions and 0 deletions
+5
View File
@@ -449,6 +449,11 @@ func lintText(t *ast.Text, tab *arch.Table, archKnown bool, cfg Config, macros m
out = append(out, checkABI0Args(t)...)
}
// Non-portable register spellings (RAX/EAX under go tool asm).
if cfg.Arch == arch.AMD64 && !cfg.Disable[CodeNonportableRegister] {
out = append(out, scanNonportableRegisters(t)...)
}
// FUNCDATA / PCDATA structural validation.
out = append(out, checkFuncdata(t, cfg)...)