-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
split codemod into two packages. #75
Open
bsutton
wants to merge
22
commits into
Workiva:master
Choose a base branch
from
onepub-dev:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…teractive optionally interactive running of codemod
…demon package has exactly the same functionality as before except that the underlying ast traversal and creation of patches has been moved to codemon_core. The idea is that codemon_core can be used as an standalone API outside of the codemon CLI tooling.
Cleanup. upgraded to latest version of analyzer. Added option to ignore overlapping patches.
…erlapping patches that were skipped.
Security InsightsNo security relevant content was detected by automated scans. Action Items
Questions or Comments? Reach out on Slack: #support-infosec. |
… no patches were included. This creates a more consistent expectation - I apply a changes set and an output file is created.
Hey @bsutton thanks for the PR! This seems reasonable to me. I'm heading out for the holiday but will look at getting this merged when I'm back. |
…d the print statement.
…rent process of throwing a PatchException obscures the underlying cause.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm not certain if I should be raising this against your project as it's actually a fork of @greenealexander where he adds a 'non-interactive' mode.
This is a rather large commit as it splits codemod into two packages.
The original codemod package works as it always has (all unit tests pass).
The new codemod_core puts the scanning and patch logic into a separate package that can be used as an API.
codemod_core performs no interaction with the CLI so it can be used in any Dart app.
I've also introduced a new ChangeSet which describes a set of patches to be applied to a single dart library.
This is possibly more performant than the existing code as it now reads/writes the file once.
This code somewhat inverts the logic as it applies all selectors to a file rather than all files to the selector.
If you want to process all files for a single selector then you should create a PatchGenerator for a single selector, apply the patches and then do the same for the next selector.
Here the code is, use it as you will or not.