Skip to content

Formatter README links rules.ts and names createRulesMap, which the Go port does not have #64939

Open
lgriffin/TypeScript
#1

Description

Acknowledgement

  • I acknowledge that issues using this template may be closed without further explanation at the maintainer's discretion.

Comment

Hey folks,

First issue so hopefully I get this right!

tsc/internal/format/README.md still describes the formatter as it was in the TypeScript 6 code base:

  • Line 22 links ./rules.ts, which does not exist, so the link is broken on GitHub. The rules are in tsc/internal/format/rules.go.
  • It says processPair requests its rules "via createRulesMap". The Go port has no such function. processPair calls getRules (span.go), which reads the map that buildRulesMap builds once (rulesmap.go).

The other functions the README names (FormatSpan, processNode, processPair) still exist in api.go and span.go.

Suggested fix: point the link at rules.go, and name getRules and buildRulesMap in place of createRulesMap. PR #1 makes this change.

Found with a little tool I'm building called CSH, a static analysis tool that compares a repository's prose with its code, and checked by hand. AI assistance (Claude Code) was used to find and draft it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions