Skip to content
This repository has been archived by the owner on Dec 1, 2024. It is now read-only.

[ Internal API ] Allow linters to blame nodes that were not given to getLintErrorForNode. #278

Open
lexidor opened this issue Mar 20, 2020 · 0 comments
Labels
bc break Backwards-incompatible changes

Comments

@lexidor
Copy link
Contributor

lexidor commented Mar 20, 2020

Hmm, yeah, it's currently a bit broken: getPrettyTextForNode takes a TNode but is called with others:

ASTLintError.hack
61:    return $this->linter->getPrettyTextForNode(/* HH_FIXME[4110] */$this->node);

The right thing to do is probably to make that take a Node, not a TNode, and make linters use as etc.

The alternative fix is to make ASTLintError generic again, but that led to a lot of complicated spaghetti

Originally posted by @fredemmott in #276

@fredemmott fredemmott added the bc break Backwards-incompatible changes label Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bc break Backwards-incompatible changes
Projects
None yet
Development

No branches or pull requests

2 participants