Feedback Provider API exposing multiple errorRecords and accepting multiple Recommendations #20834
JustinGrote
started this conversation in
Enhancements
Replies: 1 comment 1 reply
-
Really interesting idea, feedback provider was primarily designed for single command executions in the interactive terminal so I imagine just the last error is considered there. I agree this is starting to blur the lines a little with PSSA rules and feedback providers, definitely need to think about unification of interface. cc @daxian-dbw for your thoughts |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
@StevenBucher98 wanted to start this as a discussion before making it an issue.
One particular scenario I've run into is when someone is not just running a simple command, they are running a script or whatnot that may issue multiple nonterminating errors.
In such a scenario, I want to be able to analyze the multiple errors and provide a recommendation for each. I cannot do this with the
LastError
context interface.As such, as a non-breaking change I would like to request a new interface for the feedbackprovider that provides a
LastErrors
property for all errors that occured in the last executed command, as well as accept an array ofRecommendedAction
objects. This could ultimately become the primary feedback provider interface, since acting on the last error and returning only one recommendedAction could be adapted to this interface.In addition, it seems the lines between RecommendedAction and ScriptAnalyzer Analyzers are very very close, it may be worth unifying some interfaces there to make them compatible with each other, especially to potentially offer a "quick fix" option to the command line via a feedbackprovider that will rewrite the command for the user if a certain keybinding is pressed for instance.
Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions