fix(lint): guard unnamed TEXT and refresh the textflag table
This commit is contained in:
+3
-3
@@ -12,8 +12,8 @@ import (
|
||||
|
||||
// checkFuncdata validates the structure of FUNCDATA and PCDATA directives,
|
||||
// which carry the GC stack-map information. The checks are deliberately
|
||||
// shallow — they confirm the operands are well formed and that a literal index
|
||||
// is within the small range the runtime uses — and never try to interpret a
|
||||
// shallow, they confirm the operands are well formed and that a literal index
|
||||
// is within the small range the runtime uses, and never try to interpret a
|
||||
// named index constant such as $PCDATA_StackMapIndex.
|
||||
func checkFuncdata(t *ast.Text, cfg Config) []Diagnostic {
|
||||
var out []Diagnostic
|
||||
@@ -89,7 +89,7 @@ func checkIndex(op *ast.Operand, directive string) []Diagnostic {
|
||||
if op.Imm.HasVal && (op.Imm.Val < 0 || op.Imm.Val > 10) {
|
||||
return []Diagnostic{{
|
||||
Pos: op.Pos, Severity: Warning, Code: CodeFuncdata,
|
||||
Message: fmt.Sprintf("%s index %d is outside the valid range 0–10", directive, op.Imm.Val),
|
||||
Message: fmt.Sprintf("%s index %d is outside the valid range 0-10", directive, op.Imm.Val),
|
||||
}}
|
||||
}
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user