Konstantin ShcheglovHey everyone. This is a WIP of changing the BulkFixProcessor to be able to handle force-enabled lints, which will eventually be used for the migrate tool's pre-migration and post-migration phase.
I cloned the driver and the analysis options map. The analysis options map has existing lints and the new ones we're trying to enable.
This is what I understood from our email thread, so let me know if I'm overlooking some API I should be using or if this is different than what you envisioned. I'd appreciate if you could give this a look to LMK if I'm completely off the mark here. Thank you!
Kallen TuMy understanding of the email thread was: don't clone, prefer using API; so create a new `AnalysisContextCollection` using the same `ByteStore` instance, maybe with `OverlayResourceProvider` to patch `analysis_options.yaml` file(s).
Kallen TuNoted. Made more changes, PTAL.
Resolving.
var originalDriver = (originalContext as DriverBasedAnalysisContext).driver;Kallen TuThe server already knows resourceProvider and byteStore, there is no need to pick them out of the driver. Pass them down from the calling context.
Passed them in as parameters, PTAL
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
this._workspace, {These probably could be part of workspace.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
this._workspace, {These probably could be part of workspace.
Adding byteStore to `DartChangeWorkspace` changes 20+ callsites if the parameter was required, and many of those call sites aren't using BulkFixProcessor afterwards. If we kept it optional, I'd prefer it to be in the parameter list of BulkFixProcessor, like how it is now.
Removed the resourceProvider though. We can get that through the workspace.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
includedPaths: [originalContext.contextRoot.root.path],I think this needs to pass in the excluded paths as well, otherwise it might analyze more files than intended, which could lead to unwanted fixes being applied.
If that's true, then we should have a regression test.
I don't think it will break users to land this as-is and address the exclusions in a follow-on CL if you want.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +2 |
includedPaths: [originalContext.contextRoot.root.path],I think this needs to pass in the excluded paths as well, otherwise it might analyze more files than intended, which could lead to unwanted fixes being applied.
If that's true, then we should have a regression test.
I don't think it will break users to land this as-is and address the exclusions in a follow-on CL if you want.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
[migrate] Allow additional force enabled codes in BulkFixProcessor.
This CL allows the BulkFixProcessor to handle additional force-enabled
codes that may not be enabled in the existing analysis options of the
current project.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |