You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
codeFixes for things that aren't diagnostics #19392
It would be nice to have a codeFix to fix implicit-any instead of a refactoring. I believe a refactoring requires you to highlight the thing in question, which isn't easily discoverable.
Currently codeFixes work by iterating over errors; but in this case we would want to produce one even in an error-less build.
This would also help us avoid having to create codeFix / refactor pairs for things such as installing types for implicit-any packages.
We could also generate "info" errors (ref: #14501) that don't surface normally and make codeFixes for those.
I asked about this at today's design meeting and the consensus seemed to be that we should create a separate (linter-like) tool to detect such cases and then offer to fix them (i.e. that this doesn't belong in the compiler).
I understood that we proposed to add new compiler APIs (e.g. getImplicitAnyDeclarations) on a case-by-case basis as we determined that doing the work in a separate tool was infeasible. I believe it was Mohamed Hegazy (@mhegazy) who brought it up.
Activity
DanielRosenwasser commentedon Oct 20, 2017
Andrew Casey (@amcasey) was talking about how this is enabled with "info" diagnostics in Roslyn
amcasey commentedon Oct 20, 2017
I asked about this at today's design meeting and the consensus seemed to be that we should create a separate (linter-like) tool to detect such cases and then offer to fix them (i.e. that this doesn't belong in the compiler).
amcasey commentedon Oct 20, 2017
I understood that we proposed to add new compiler APIs (e.g. getImplicitAnyDeclarations) on a case-by-case basis as we determined that doing the work in a separate tool was infeasible. I believe it was Mohamed Hegazy (@mhegazy) who brought it up.