Skip to content

Commit aed6c77

Browse files
Add debug logging to member-ordering rule to diagnose ordering issues
- Added stderr debug output showing member kind, name, rank, and supportsModifiers - Will help identify why valid test cases are failing - Debug output goes to stderr to avoid breaking IPC protocol 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent fcb46a5 commit aed6c77

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

internal/rules/member_ordering/member_ordering.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package member_ordering
22

33
import (
44
"fmt"
5+
"os"
56
"strings"
67

78
"github.com/microsoft/typescript-go/shim/ast"
@@ -644,6 +645,9 @@ func checkGroupSort(ctx rule.RuleContext, members []*ast.Node, groupOrder []inte
644645
for _, member := range members {
645646
rank := getRank(member, groupOrder, supportsModifiers)
646647
name := getMemberName(member, ctx.SourceFile)
648+
// DEBUG: write to stderr to avoid breaking protocol
649+
// Remove after diagnosing ordering issues
650+
fmt.Fprintf(os.Stderr, "[member-ordering DEBUG] kind=%d name=%q rank=%d supportsModifiers=%v\n", member.Kind, name, rank, supportsModifiers)
647651

648652
if rank == -1 {
649653
continue

0 commit comments

Comments
 (0)