Open rrousselGit opened 1 year ago
CC @pq @scheglov @bwilkerson
I think I agree. It would be perfectly reasonable to use these while writing a diagnostic in a plugin, right?
On that note, ErrorReporter
is public and has a public constructor which accepts a Source
. But Source
isn't public
I believe Source
is also available on various other places (Element)
Some equally valuable utilities to expose would be the fixes / CorrectionProducer
s
There's a large amount of them, and diagnostic plugins would otherwise have to reimplement them for their use-case.
It's my opinion that we don't want to commit to supporting the lint related classes as part of the public API for the analyzer package, or to make CorrectionProducer
public, until we have resolved the issue of whether and how to support plugins.
We've got working designs for how to support plugins using LintRule, LintCode, CorrectionProducer, et al, so I will start working to make the necessary lint-related classes public. CC @pq
This is hype! I'll definitely try this whenever it's available :)
Hello!
I am working on enabling the implementation of custom lint rules in a syntax similar to how the Dart SDK defines them.
And while investigating how the SDK handles lints, I realized a large amount of classes related to them are private.
Here's a non-exhaustive of potential classes that I feel would be valuable if made public:
and their equally valuable dependencies, such as InterfaceManagger3, LinterVisitor, ...
All of these combined contain a large number of valuable utilities. Yet these objects aren't easily extractable out of the SDK. They are often entangled with the implementation classes of other aspects of the analyzer.